|
@@ -42,10 +42,12 @@ typedef struct {
|
|
|
|
|
|
|
|
#define MAX_TRQ_POINTS 60
|
|
#define MAX_TRQ_POINTS 60
|
|
|
#define MAX_SPD_POINTS 100
|
|
#define MAX_SPD_POINTS 100
|
|
|
-
|
|
|
|
|
|
|
+#define TBL_TRQ_INTVAL 1
|
|
|
|
|
+#define TBL_SPD_INTVAL 100
|
|
|
typedef struct {
|
|
typedef struct {
|
|
|
s16 d[MAX_TRQ_POINTS][MAX_SPD_POINTS];
|
|
s16 d[MAX_TRQ_POINTS][MAX_SPD_POINTS];
|
|
|
s16 q[MAX_TRQ_POINTS][MAX_SPD_POINTS];
|
|
s16 q[MAX_TRQ_POINTS][MAX_SPD_POINTS];
|
|
|
|
|
+ u16 magic;
|
|
|
u16 crc16;
|
|
u16 crc16;
|
|
|
}torque_lut_t;
|
|
}torque_lut_t;
|
|
|
|
|
|
|
@@ -56,6 +58,9 @@ typedef struct {
|
|
|
#define focParam_idx_0 (motorParam_idx_0 + 2)
|
|
#define focParam_idx_0 (motorParam_idx_0 + 2)
|
|
|
#define focParam_idx_1 (motorParam_idx_0 + 3)
|
|
#define focParam_idx_1 (motorParam_idx_0 + 3)
|
|
|
|
|
|
|
|
|
|
+#define trq_Tbl_idx (focParam_idx_1 + 1)
|
|
|
|
|
+#define trq_Tbl_size (30)
|
|
|
|
|
+
|
|
|
void nv_storage_init(void);
|
|
void nv_storage_init(void);
|
|
|
motor_params_t *nv_get_motor_params(void);
|
|
motor_params_t *nv_get_motor_params(void);
|
|
|
foc_params_t *nv_get_foc_params(void);
|
|
foc_params_t *nv_get_foc_params(void);
|
|
@@ -70,6 +75,7 @@ void nv_get_pid(u8 id, pid_conf_t *pid);
|
|
|
void nv_set_hwbrake_mode(u8 mode);
|
|
void nv_set_hwbrake_mode(u8 mode);
|
|
|
void nv_set_throttle_vol(float min, float max);
|
|
void nv_set_throttle_vol(float min, float max);
|
|
|
void nv_set_ebrake_current(float phase_curr, float dc_curr);
|
|
void nv_set_ebrake_current(float phase_curr, float dc_curr);
|
|
|
|
|
+torque_lut_t *nv_get_trq_tlb(void);
|
|
|
|
|
|
|
|
#endif /* _NV_Storage_H__ */
|
|
#endif /* _NV_Storage_H__ */
|
|
|
|
|
|