Skip to content

Commit

Permalink
Refloat: no wheelslip detection in flywheel mode
Browse files Browse the repository at this point in the history
Fix: Don't report wheelslip in flywheel mode

Signed-off-by: Dado Mista <[email protected]>
  • Loading branch information
surfdado committed Mar 27, 2024
1 parent e4500bb commit 6070531
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion refloat/refloat/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,11 @@ static void calculate_setpoint_target(data *d) {
}
}

if (d->state.mode != MODE_FLYWHEEL) {
if (d->state.mode == MODE_FLYWHEEL) {
// We don't care about / don't want to report wheelslip in flywheel mode
d->state.wheelslip = false;
}
else {
if (d->state.sat == SAT_PB_DUTY) {
if (d->float_conf.is_dutybeep_enabled || (d->float_conf.tiltback_duty_angle == 0)) {
beep_on(d, true);
Expand Down

0 comments on commit 6070531

Please sign in to comment.