@@ -8,20 +8,20 @@ enum PowerSettingsSubmenuIndex {
88 PowerSettingsSubmenuIndexOff ,
99};
1010
11- #define P_AUTO_POWEROFF_DELAY_COUNT 8
12- const char * const p_auto_poweroff_delay_text [ P_AUTO_POWEROFF_DELAY_COUNT ] =
13- {"OFF" ,"5min" , "10min" , "15min" , "30min" , "45min" , "60min" , "90min" };
11+ #define AUTO_POWEROFF_DELAY_COUNT 9
12+ const char * const auto_poweroff_delay_text [ AUTO_POWEROFF_DELAY_COUNT ] =
13+ {"OFF" ,"5 sec" , " 5min" , "10min" , "15min" , "30min" , "45min" , "60min" , "90min" };
1414
15- const uint32_t p_auto_poweroff_delay_value [ P_AUTO_POWEROFF_DELAY_COUNT ] =
16- {0 , 300000 , 600000 , 900000 , 1800000 , 2700000 , 3600000 , 5400000 };
15+ const uint32_t auto_poweroff_delay_value [ AUTO_POWEROFF_DELAY_COUNT ] =
16+ {0 , 5000 , 300000 , 600000 , 900000 , 1800000 , 2700000 , 3600000 , 5400000 };
1717
1818// change variable_item_list visible text and app_poweroff_delay_time_settings when user change item in variable_item_list
1919static void power_settings_scene_start_auto_poweroff_delay_changed (VariableItem * item ) {
2020 PowerSettingsApp * app = variable_item_get_context (item );
2121 uint8_t index = variable_item_get_current_value_index (item );
2222
23- variable_item_set_current_value_text (item , p_auto_poweroff_delay_text [index ]);
24- app -> settings .p_auto_poweroff_delay_ms = p_auto_poweroff_delay_value [index ];
23+ variable_item_set_current_value_text (item , auto_poweroff_delay_text [index ]);
24+ app -> settings .auto_poweroff_delay_ms = auto_poweroff_delay_value [index ];
2525}
2626
2727static void power_settings_scene_start_submenu_callback (void * context , uint32_t index ) { //show selected menu screen
@@ -39,16 +39,16 @@ void power_settings_scene_start_on_enter(void* context) {
3939 item = variable_item_list_add (
4040 variable_item_list ,
4141 "Auto PowerOff Time" ,
42- P_AUTO_POWEROFF_DELAY_COUNT ,
42+ AUTO_POWEROFF_DELAY_COUNT ,
4343 power_settings_scene_start_auto_poweroff_delay_changed , //function for change visible item list value and app settings
4444 app );
4545
4646 value_index = value_index_uint32 (
47- app -> settings .p_auto_poweroff_delay_ms ,
48- p_auto_poweroff_delay_value ,
49- P_AUTO_POWEROFF_DELAY_COUNT );
47+ app -> settings .auto_poweroff_delay_ms ,
48+ auto_poweroff_delay_value ,
49+ AUTO_POWEROFF_DELAY_COUNT );
5050 variable_item_set_current_value_index (item , value_index );
51- variable_item_set_current_value_text (item , p_auto_poweroff_delay_text [value_index ]);
51+ variable_item_set_current_value_text (item , auto_poweroff_delay_text [value_index ]);
5252
5353 variable_item_list_add (variable_item_list , "Battery Info" , 1 , NULL , NULL );
5454 variable_item_list_add (variable_item_list , "Reboot" , 1 , NULL , NULL );
0 commit comments