app.c 238 B

1234567891011121314151617
  1. #include "app/app.h"
  2. #include "foc/foc.h"
  3. void app_init(void){
  4. }
  5. void start_stop_handler(void) {
  6. FOCState s = FOC_STM_State();
  7. if (s == IDLE) {
  8. Foc_Set_StartRamp(8.0f, 1000);
  9. foc_start_motor();
  10. }else {
  11. foc_stop_motor();
  12. }
  13. }