Skip to content

Commit 70da67e

Browse files
committed
fix: Ensure outputs are quiet when tick is disabled and during speaker setup
1 parent c3fc1bf commit 70da67e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/drivers/io/io.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ void tick_enable(bool enable) {
183183
} else {
184184
led_tick = false;
185185
speaker_tick = false;
186+
// Ensure outputs are quiet when disabled
187+
speakerOff();
188+
digitalWrite(LED_BUILTIN, LOW);
186189
}
187190
}
188191

@@ -227,6 +230,8 @@ void setup_speaker(bool _led_tick, bool _speaker_tick) {
227230
mcpwm_init(MCPWM_UNIT_0, MCPWM_TIMER_0, &pwm_config);
228231

229232
tick_enable(false); // no ticking while we init audio
233+
speakerOff();
234+
digitalWrite(LED_BUILTIN, LOW);
230235

231236
if (!audio_command_queue) {
232237
audio_command_queue = xQueueCreate(8, sizeof(AudioCommand));

0 commit comments

Comments
 (0)