diff options
author | James Haggerty <james@gruemail.com> | 2022-10-12 11:59:43 +1100 |
---|---|---|
committer | James Haggerty <james@gruemail.com> | 2022-10-12 11:59:43 +1100 |
commit | be1f3d3631d5403bb8391182258118098816d113 (patch) | |
tree | a3a740e198da5e95c3e529f3a4c8720eb47cb5a2 | |
parent | 95f2f25ee68d2c7bd1f55f74d425153a9aa4d36d (diff) | |
download | Sensor-Watch-be1f3d3631d5403bb8391182258118098816d113.tar.gz Sensor-Watch-be1f3d3631d5403bb8391182258118098816d113.tar.bz2 Sensor-Watch-be1f3d3631d5403bb8391182258118098816d113.zip |
Make starter project work in simulator
Use the higher abstraction level sleeping.
-rw-r--r-- | apps/starter-project/app.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/starter-project/app.c b/apps/starter-project/app.c index 9a4ef4fe..5dfde68d 100644 --- a/apps/starter-project/app.c +++ b/apps/starter-project/app.c @@ -1,6 +1,7 @@ #include <stdio.h> #include <string.h> #include "watch.h" +#include "watch_main_loop.h" ////////////////////////////////////////////////////////////////////////////////////////// // This section sets up types and storage for our application state. @@ -156,13 +157,13 @@ bool app_loop(void) { if (application_state.enter_sleep_mode) { // wait a moment for the user's finger to be off the button - delay_ms(250); + main_loop_sleep(250); // nap time :) watch_enter_deep_sleep_mode(); // we just woke up; wait a moment again for the user's finger to be off the button... - delay_ms(250); + main_loop_sleep(250); // and prevent ourselves from going right back to sleep. application_state.enter_sleep_mode = false; |