thro_torque.h 600 B

123456789101112131415161718192021222324
  1. #ifndef _THRO_TORQUE_H__
  2. #define _THRO_TORQUE_H__
  3. #include "os/os_types.h"
  4. #include "foc/core/PMSM_FOC_Core.h"
  5. typedef struct {
  6. bool accl;
  7. float torque_req;
  8. float torque_real;
  9. float thro_filted;
  10. float spd_filted;
  11. float thro_ration;
  12. float thro_ration_last;
  13. u8 gear;
  14. }thro_torque_t;
  15. void thro_torque_reset(void);
  16. void thro_torque_init(void);
  17. float thro_ration_to_voltage(float r);
  18. void thro_torque_process(u8 run_mode, float f_throttle);
  19. float get_user_request_torque(void);
  20. float thro_torque_gear_map(s16 rpm, u8 gear);
  21. float thro_get_ration(float f_thro);
  22. #endif /* _THRO_TORQUE_H__ */