thro_torque.h 593 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. }thro_torque_t;
  14. void trq2dq_lookup(int rpm, float torque, DQ_t *dq_out);
  15. void trq2dq_lookup_init(void);
  16. void thro_torque_reset(void);
  17. void thro_torque_init(void);
  18. float thro_ration_to_voltage(float r);
  19. void thro_torque_process(u8 run_mode, float f_throttle);
  20. float get_user_request_torque(void);
  21. #endif /* _THRO_TORQUE_H__ */