|
|
@@ -139,7 +139,7 @@ void mc_conf_load(void) {
|
|
|
do { \
|
|
|
conf.g_n[l].max_speed = CONFIG_Gear##l##_MaxSpeed;\
|
|
|
conf.g_n[l].max_idc = CONFIG_Gear##l##_MaxIdc;\
|
|
|
- conf.g_n[l].max_trq = CONFIG_Gear##l##_MaxTorque;\
|
|
|
+ conf.g_n[l].max_torque = CONFIG_Gear##l##_MaxTorque;\
|
|
|
conf.g_n[l].zero_accl = CONFIG_Gear##l##_ZeroAccl;\
|
|
|
conf.g_n[l].accl_time = CONFIG_Gear##l##_NormalAccl;\
|
|
|
Gear_torque(l,0);Gear_torque(l,1);Gear_torque(l,2);Gear_torque(l,3);Gear_torque(l,4); \
|
|
|
@@ -151,7 +151,7 @@ void mc_conf_load(void) {
|
|
|
do { \
|
|
|
conf.g_l[l].max_speed = CONFIG_GearLow##l##_MaxSpeed;\
|
|
|
conf.g_l[l].max_idc = CONFIG_GearLow##l##_MaxIdc;\
|
|
|
- conf.g_l[l].max_trq = CONFIG_GearLow##l##_MaxTorque;\
|
|
|
+ conf.g_l[l].max_torque = CONFIG_GearLow##l##_MaxTorque;\
|
|
|
conf.g_l[l].zero_accl = CONFIG_GearLow##l##_ZeroAccl;\
|
|
|
conf.g_l[l].accl_time = CONFIG_GearLow##l##_NormalAccl;\
|
|
|
GearLow_torque(l,0);GearLow_torque(l,1);GearLow_torque(l,2);GearLow_torque(l,3);GearLow_torque(l,4); \
|
|
|
@@ -441,7 +441,7 @@ int mc_conf_decode_gear(gear_t *g , u8 *buff) {
|
|
|
u8 *ori = buff;
|
|
|
for (int i = 0; i < CONFIG_MAX_GEARS; i++) {
|
|
|
g[i].max_speed = decode_s16(buff); buff += 2;
|
|
|
- g[i].max_trq = decode_s16(buff); buff += 2;
|
|
|
+ g[i].max_torque = decode_s16(buff); buff += 2;
|
|
|
g[i].max_idc = decode_s16(buff); buff += 2;
|
|
|
g[i].zero_accl = decode_u16(buff); buff += 2;
|
|
|
g[i].accl_time = decode_u16(buff); buff += 2;
|
|
|
@@ -451,7 +451,7 @@ int mc_conf_decode_gear(gear_t *g , u8 *buff) {
|
|
|
g[i].torque[j] = 100;
|
|
|
}
|
|
|
}
|
|
|
- g[i].max_trq = min(g[i].max_trq, conf.c.max_torque);
|
|
|
+ g[i].max_torque = min(g[i].max_torque, conf.c.max_torque);
|
|
|
g[i].max_idc = min(g[i].max_idc, conf.c.max_idc);
|
|
|
}
|
|
|
return buff - ori;
|
|
|
@@ -461,7 +461,7 @@ int mc_conf_encode_gear(gear_t *g, u8 *buff) {
|
|
|
u8 *ori = buff;
|
|
|
for (int i = 0; i < CONFIG_MAX_GEARS; i++) {
|
|
|
encode_s16(buff, g[i].max_speed); buff += 2;
|
|
|
- encode_s16(buff, g[i].max_trq); buff += 2;
|
|
|
+ encode_s16(buff, g[i].max_torque); buff += 2;
|
|
|
encode_s16(buff, g[i].max_idc); buff += 2;
|
|
|
encode_u16(buff, g[i].zero_accl); buff += 2;
|
|
|
encode_u16(buff, g[i].accl_time); buff += 2;
|