Control.c 583 B

1234567891011121314151617181920212223242526
  1. /**
  2. @copyright None
  3. @file Control.c
  4. @author Comment Vivre
  5. @date 2025-11-01
  6. @brief None
  7. */
  8. #include <MyProject.h>
  9. /**
  10. @function Get_Target_Ref
  11. @brief 速度给定
  12. @date 2025-11-01
  13. */
  14. void Get_Target_Ref(void)
  15. {
  16. if (powerControl.PowerSate == POWER_RUN)
  17. {
  18. #if (CONTROL_MODE == NONEMODE)
  19. isCtrlPowOn = true;
  20. motorControl.TargetRef = TARGET_SPEED_SET;
  21. motorControl.QOutRef = I_Value(1.0);
  22. #elif (CONTROL_MODE == UARTMODE)
  23. #endif
  24. }
  25. }