diff options
author | Alexsander Akers <me@a2.io> | 2022-01-26 20:24:15 -0500 |
---|---|---|
committer | Alexsander Akers <me@a2.io> | 2022-01-27 11:12:01 -0500 |
commit | cb8223217b9fbcb705677dad890b35a467a44e75 (patch) | |
tree | 0897cde67b16c6c3e33345b98381164499416c1a /watch-library/simulator/watch/watch_buzzer.c | |
parent | a0f8e9c8bc458b0a34b34864703fd97d9835fd86 (diff) | |
download | Sensor-Watch-cb8223217b9fbcb705677dad890b35a467a44e75.tar.gz Sensor-Watch-cb8223217b9fbcb705677dad890b35a467a44e75.tar.bz2 Sensor-Watch-cb8223217b9fbcb705677dad890b35a467a44e75.zip |
Update main loop to fix reentrancy runtime errors
Diffstat (limited to 'watch-library/simulator/watch/watch_buzzer.c')
-rw-r--r-- | watch-library/simulator/watch/watch_buzzer.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 <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(); } |