Update main loop to fix reentrancy runtime errors

This commit is contained in:
Alexsander Akers
2022-01-26 20:24:15 -05:00
parent a0f8e9c8bc
commit cb8223217b
7 changed files with 124 additions and 41 deletions

View File

@@ -23,6 +23,7 @@
*/
#include "watch_buzzer.h"
#include "watch_main_loop.h"
#include <emscripten.h>
@@ -97,6 +98,7 @@ void watch_buzzer_play_note(BuzzerNote note, uint16_t duration_ms) {
watch_set_buzzer_period(NotePeriods[note]);
watch_set_buzzer_on();
}
emscripten_sleep(duration_ms);
main_loop_sleep(duration_ms);
watch_set_buzzer_off();
}