diff options
Diffstat (limited to 'apps/settings/main.cpp')
-rw-r--r-- | apps/settings/main.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/settings/main.cpp b/apps/settings/main.cpp index ae0734b..a886b91 100644 --- a/apps/settings/main.cpp +++ b/apps/settings/main.cpp @@ -7,14 +7,14 @@ extern bool rtc_get_datetime(datetime_t *t); -void app_settings::show_title(Api *app_api) { +void app_settings::show_title(AppAPI *app_api) { std::string title_str {"Settings (/" MAIN_SET_NUM_STR ")"}; title_str.insert(10, std::to_string(selected_setting+1)); app_api->gui_header_text(title_str); } // Time and date settings -void app_settings::set0_menu(Api *app_api) { +void app_settings::set0_menu(AppAPI *app_api) { #define NUM_CHOICES 9 static const char *choices[NUM_CHOICES] = {"Hour", "Minute", "Second", "Year", "Month", "Day", "Day of week", STR_SET_APPLY, STR_SET_CANCEL}; uint max_value; @@ -88,7 +88,7 @@ void app_settings::set0_menu(Api *app_api) { } // Display settings -void app_settings::set1_menu(Api *app_api) { +void app_settings::set1_menu(AppAPI *app_api) { #define NUM_CHOICES 4 static const char *choices[NUM_CHOICES] = {"Display brightness", "Sleep timeout", "Time format", STR_SET_APPLY}; @@ -119,7 +119,7 @@ void app_settings::set1_menu(Api *app_api) { } // Rendering of app -BaseApp::AppReturnValues app_settings::render(Api *app_api) { +BaseApp::AppReturnValues app_settings::render(AppAPI *app_api) { show_title(app_api); app_api->display_write_string(0,0,3, display_setting_name, FONT_12x16, 0, 1); @@ -138,7 +138,7 @@ BaseApp::AppReturnValues app_settings::render(Api *app_api) { return AppReturnValues::OK; } -BaseApp::AppReturnValues app_settings::btn_pressed(Api *app_api, uint gpio, unsigned long delta) { +BaseApp::AppReturnValues app_settings::btn_pressed(AppAPI *app_api, uint gpio, unsigned long delta) { switch (gpio) { case BUTTON_SELECT: selected = true; @@ -160,14 +160,14 @@ BaseApp::AppReturnValues app_settings::btn_pressed(Api *app_api, uint gpio, unsi return AppReturnValues::OK; } -app_settings::app_settings(Api *app_api) { - app_api->performance_set(Api::perf_modes::LOW_POWER); +app_settings::app_settings(AppAPI *app_api) { + app_api->performance_set(AppAPI::perf_modes::LOW_POWER); selected_setting = 0; selected = false; snprintf(display_setting_name, SIZE_SETTING_NAME, "%s", MAIN_SET_NAMES[0]); } -BaseApp::AppReturnValues app_settings::bgrefresh(Api *app_api, bool in_foreground) { +BaseApp::AppReturnValues app_settings::bgrefresh(AppAPI *app_api, bool in_foreground) { return AppReturnValues::OK; } |