| 123456789101112131415161718192021222324252627282930313233 |
- #ifndef _ETSC_H__
- #define _ETSC_H__
- typedef struct {
- bool b_etcs_en;
- bool b_etcs_running;
- float f_fvel;
- float f_torque_ref;
- float f_torque_tcs;
- float f_acc;
- u32 n_fv_ts;
- int n_etcs_run_cnt;
- float output;
- }etcs_t;
- void etcs_set_fvel(etcs_t *etcs, float vel);//设置前轮速度
- bool etcs_is_running(etcs_t *etcs);
- void etcs_enable(etcs_t *etcs, bool enable);
- float etcs_process(etcs_t *etcs);
- static __INLINE bool etcs_is_running(etcs_t *etcs) {
- return etcs->b_etcs_running;
- }
- static __INLINE void etcs_enable(etcs_t *etcs, bool enable) {
- etcs->b_etcs_en = enable;
- }
- static __INLINE float etcs_get_output(etcs_t *etcs) {
- return etcs->output;
- }
- #endif /* _ETSC_H__ */
|