|
|
@@ -35,7 +35,7 @@ static shark_timer_t _led_off_timer = TIMER_INIT(_led_off_timer, _led_off_timer_
|
|
|
m_contrl_t motor = {
|
|
|
.s_direction = POSITIVE,
|
|
|
.n_gear = 0,
|
|
|
- .b_is96Mode = false,
|
|
|
+ .b_high_vol_mode = false,
|
|
|
.mode = CTRL_MODE_OPEN,
|
|
|
.mos_lim = 0,
|
|
|
.motor_lim = 0,
|
|
|
@@ -176,13 +176,13 @@ static u32 _self_check_task(void *p) {
|
|
|
}
|
|
|
|
|
|
static bool mc_detect_vbus_mode(void) {
|
|
|
-#ifdef CONFIG_FORCE_96V_MODE
|
|
|
- motor.b_is96Mode = true;
|
|
|
+#ifdef CONFIG_FORCE_HIGH_VOL_MODE
|
|
|
+ motor.b_high_vol_mode = true;
|
|
|
return false;
|
|
|
#else
|
|
|
- bool is_96mode = motor.b_is96Mode;
|
|
|
- motor.b_is96Mode = get_vbus_int() >= CONFIG_96V_MODE_VOL;
|
|
|
- return (is_96mode != motor.b_is96Mode);
|
|
|
+ bool is_96mode = motor.b_high_vol_mode;
|
|
|
+ motor.b_high_vol_mode = get_vbus_int() >= CONFIG_HIGH_VOL_MODE_MIN_VOL;
|
|
|
+ return (is_96mode != motor.b_high_vol_mode);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
@@ -253,7 +253,7 @@ gear_t *mc_gear_conf_by_gear(u8 n_gear) {
|
|
|
if (!foc_observer_is_encoder()) { //无感模式,受限运行
|
|
|
return &sensorless_gear;
|
|
|
}
|
|
|
- if (motor.b_is96Mode) {
|
|
|
+ if (motor.b_high_vol_mode) {
|
|
|
gears = &mc_conf()->g_n[0];
|
|
|
}else {
|
|
|
gears = &mc_conf()->g_l[0];
|