From cb8223217b9fbcb705677dad890b35a467a44e75 Mon Sep 17 00:00:00 2001 From: Alexsander Akers Date: Wed, 26 Jan 2022 20:24:15 -0500 Subject: Update main loop to fix reentrancy runtime errors --- watch-library/simulator/watch/watch_buzzer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'watch-library/simulator/watch/watch_buzzer.c') diff --git a/watch-library/simulator/watch/watch_buzzer.c b/watch-library/simulator/watch/watch_buzzer.c index c5191de2..1c95a96d 100644 --- a/watch-library/simulator/watch/watch_buzzer.c +++ b/watch-library/simulator/watch/watch_buzzer.c @@ -23,6 +23,7 @@ */ #include "watch_buzzer.h" +#include "watch_main_loop.h" #include @@ -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(); } -- cgit v1.2.3