Skip to content

Commit bd68293

Browse files
committed
Flywheel: do not attempt to lower erpm limits, cleanup
Fix: do not risk chance that erpm limit is reduced to 6000 after doing flywheel
1 parent fa6bd0c commit bd68293

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/main.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1737,13 +1737,9 @@ static void cmd_flywheel_toggle(Data *d, unsigned char *cfg, int len) {
17371737
d->tiltback_duty_step_size = d->float_conf.tiltback_duty_speed / d->float_conf.hertz;
17381738
d->tiltback_return_step_size = d->float_conf.tiltback_return_speed / d->float_conf.hertz;
17391739

1740-
// Limit speed of wheel and limit amps
1741-
VESC_IF->set_cfg_float(CFG_PARAM_l_min_erpm + 100, -6000);
1742-
VESC_IF->set_cfg_float(CFG_PARAM_l_max_erpm + 100, 6000);
1740+
// Limit amps
17431741
d->motor.current_max = d->motor.current_min = 40;
17441742

1745-
// d->flywheel_allow_abort = cfg[5];
1746-
17471743
// Disable I-term and all tune modifiers and tilts
17481744
d->float_conf.ki = 0;
17491745
d->float_conf.kp_brake = 1;

0 commit comments

Comments
 (0)