aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorConfuSomu2021-03-01 20:57:47 -0500
committerConfuSomu2021-03-01 20:57:47 -0500
commite63fcd31861aecfd0760d77b8ab0eea0c528ea8c (patch)
treeed81879a96881cb10706107d0ce8e721b2c0ac44 /apps
parentc0cec91c3fe6bc991c53c028a21711f21efb3704 (diff)
downloadpico-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.cpp1
-rw-r--r--apps/main_clock.cpp1
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
}