Skip to content

Commit

Permalink
Fix startup beeps
Browse files Browse the repository at this point in the history
Fix: Fix beeper beeping on board startup.
  • Loading branch information
lukash committed Mar 29, 2024
1 parent dd1bbac commit c7bf3eb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions refloat/refloat/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,6 @@ static void reconfigure(data *d) {

static void configure(data *d) {
state_init(&d->state, d->float_conf.disabled);
if (d->state.state == STATE_DISABLED) {
beep_alert(d, 3, false);
} else {
beep_alert(d, 1, false);
}

lcm_configure(&d->lcm, &d->float_conf.leds);

Expand Down Expand Up @@ -355,6 +350,12 @@ static void configure(data *d) {
konami_init(&d->flywheel_konami, flywheel_konami_sequence, sizeof(flywheel_konami_sequence));

reconfigure(d);

if (d->state.state == STATE_DISABLED) {
beep_alert(d, 3, false);
} else {
beep_alert(d, 1, false);
}
}

static void reset_vars(data *d) {
Expand Down

0 comments on commit c7bf3eb

Please sign in to comment.