|
|
@@ -1486,6 +1486,19 @@ static void mc_motor_runstop(void) {
|
|
|
}
|
|
|
static void mc_process_throttle_torque(float vol) {
|
|
|
float torque = throttle_get_torque(&motor.controller, vol);
|
|
|
+
|
|
|
+ if (mc_throttle_released()) {
|
|
|
+#ifdef CONFIG_CRUISE_ENABLE_ACCL
|
|
|
+ if (mc_is_cruise_enabled()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+#endif
|
|
|
+ if (mot_contrl_energy_recovery(&motor.controller, true)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if (motor.controller.mode_running == CTRL_MODE_TRQ) {
|
|
|
throttle_set_torque(&motor.controller, torque);
|
|
|
}else if (motor.controller.mode_running == CTRL_MODE_SPD) {
|