diff options
author | ConfuSomu | 2021-03-01 20:57:47 -0500 |
---|---|---|
committer | ConfuSomu | 2021-03-01 20:57:47 -0500 |
commit | e63fcd31861aecfd0760d77b8ab0eea0c528ea8c (patch) | |
tree | ed81879a96881cb10706107d0ce8e721b2c0ac44 /apps | |
parent | c0cec91c3fe6bc991c53c028a21711f21efb3704 (diff) | |
download | pico-watch-e63fcd31861aecfd0760d77b8ab0eea0c528ea8c.tar pico-watch-e63fcd31861aecfd0760d77b8ab0eea0c528ea8c.tar.gz pico-watch-e63fcd31861aecfd0760d77b8ab0eea0c528ea8c.zip |
Implement API method for setting performance
This is to lower power consumption by having the apps set the lowest
performance they need.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/home_menu.cpp | 1 | ||||
-rw-r--r-- | apps/main_clock.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/apps/home_menu.cpp b/apps/home_menu.cpp index 658d911..910ebac 100644 --- a/apps/home_menu.cpp +++ b/apps/home_menu.cpp @@ -76,6 +76,7 @@ namespace app_home_menu { // Initlisation of the app. int init(Api *app_api) { + app_api->performance_set(Api::perf_modes::LOW_POWER); pressed_button = new char; *pressed_button = '*'; selected_app = new int; *selected_app = 0; // Make sure to init the values to something known! return 0; // return 1 when function not implemented diff --git a/apps/main_clock.cpp b/apps/main_clock.cpp index 21c9e5d..895a7b9 100644 --- a/apps/main_clock.cpp +++ b/apps/main_clock.cpp @@ -64,6 +64,7 @@ namespace app_main_clock { // Initlisation of the app. int init(Api *app_api) { + app_api->performance_set(Api::perf_modes::LOW_POWER); return 1; // return 1 when function not implemented } |