Skip to content

Commit

Permalink
Fixed #281: Add Go Sleep menu in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
solosky committed Sep 26, 2024
1 parent 71f4156 commit 1dd3ec4
Show file tree
Hide file tree
Showing 18 changed files with 173 additions and 155 deletions.
6 changes: 6 additions & 0 deletions fw/application/src/app/settings/scene/settings_scene_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ enum settings_main_menu_t {
SETTINGS_MAIN_MENU_SHOW_MEM_USAGE,
SETTINGS_MAIN_MENU_SLEEP_TIMEOUT,
SETTINGS_MAIN_MENU_ANIM_ENABLED,
SETTINGS_MAIN_MENU_GO_SLEEP,
SETTINGS_MAIN_MENU_DFU,
SETTINGS_MAIN_MENU_REBOOT,
SETTINGS_MAIN_MENU_RESET_DEFAULT,
Expand Down Expand Up @@ -84,6 +85,10 @@ static void settings_scene_main_list_view_on_selected(mui_list_view_event_t even
mui_scene_dispatcher_next_scene(app->p_scene_dispatcher, SETTINGS_SCENE_LANGUAGE);
break;

case SETTINGS_MAIN_MENU_GO_SLEEP:
go_sleep();
break;

case SETTINGS_MAIN_MENU_DFU:
enter_dfu();
break;
Expand Down Expand Up @@ -205,6 +210,7 @@ static void settings_scene_main_reload(void *user_data) {
mui_list_view_add_item_ext(app->p_list_view, 0xe1c9, _T(APP_SET_SLEEP_TIMEOUT), txt,
(void *)SETTINGS_MAIN_MENU_SLEEP_TIMEOUT);

mui_list_view_add_item(app->p_list_view, 0xe1c9, _T(APP_SET_GO_SLEEP), (void *)SETTINGS_MAIN_MENU_GO_SLEEP);
mui_list_view_add_item(app->p_list_view, 0xe1ca, _T(APP_SET_DFU), (void *)SETTINGS_MAIN_MENU_DFU);
mui_list_view_add_item(app->p_list_view, 0xe1cb, _T(APP_SET_REBOOT), (void *)SETTINGS_MAIN_MENU_REBOOT);
mui_list_view_add_item(app->p_list_view, 0xe1ce, _T(APP_SET_RESET_DEFAULT),
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/de_DE.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const char * const lang_de_DE[_L_COUNT] = {
[_L_APP_SET_HIBERNATE] = "Schnelles Aufwachen",
[_L_APP_SET_SLEEP_TIMEOUT] = "Standby nach",
[_L_APP_SET_LANGUAGE] = "Sprache",
[_L_APP_SET_GO_SLEEP] = "",
[_L_APP_SET_DFU] = "Firmw. Aktualisierung",
[_L_APP_SET_REBOOT] = "System Neustart",
[_L_APP_SET_RESET_DEFAULT] = "Standardeinstellungen",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/en_US.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const char * const lang_en_US[_L_COUNT] = {
[_L_APP_SET_HIBERNATE] = "Fast Wakeup",
[_L_APP_SET_SLEEP_TIMEOUT] = "Sleep Timeout",
[_L_APP_SET_LANGUAGE] = "Language",
[_L_APP_SET_GO_SLEEP] = "Go Sleep",
[_L_APP_SET_DFU] = "Firmware Update",
[_L_APP_SET_REBOOT] = "System Reboot",
[_L_APP_SET_RESET_DEFAULT] = "Reset Default Setting",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/es_ES.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const char * const lang_es_ES[_L_COUNT] = {
[_L_APP_SET_HIBERNATE] = "Hibernar",
[_L_APP_SET_SLEEP_TIMEOUT] = "Dormir en:",
[_L_APP_SET_LANGUAGE] = "Idioma",
[_L_APP_SET_GO_SLEEP] = "",
[_L_APP_SET_DFU] = "Actualizar firmware",
[_L_APP_SET_REBOOT] = "Reiniciar",
[_L_APP_SET_RESET_DEFAULT] = "Restablecer config.",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/fr_FR.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const char * const lang_fr_FR[_L_COUNT] = {
[_L_APP_SET_HIBERNATE] = "Réveil Rapide",
[_L_APP_SET_SLEEP_TIMEOUT] = "Délai de mise en veille",
[_L_APP_SET_LANGUAGE] = "Langue",
[_L_APP_SET_GO_SLEEP] = "",
[_L_APP_SET_DFU] = "Mise à Jour du Micrologiciel",
[_L_APP_SET_REBOOT] = "Redémarrage du Système",
[_L_APP_SET_RESET_DEFAULT] = "Rétablir les Paramètres par Défaut",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/hu_HU.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const char * const lang_hu_HU[_L_COUNT] = {
[_L_APP_SET_HIBERNATE] = "Gyors Ébresztés",
[_L_APP_SET_SLEEP_TIMEOUT] = "Alvási Időkorlát",
[_L_APP_SET_LANGUAGE] = "Nyelv",
[_L_APP_SET_GO_SLEEP] = "",
[_L_APP_SET_DFU] = "Firmware Frissítés",
[_L_APP_SET_REBOOT] = "Rendszer Újraindítása",
[_L_APP_SET_RESET_DEFAULT] = "Alapért. Beállítás Visszaállítása",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/it_IT.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const char * const lang_it_IT[_L_COUNT] = {
[_L_APP_SET_HIBERNATE] = "Risveglio rapido",
[_L_APP_SET_SLEEP_TIMEOUT] = "Timeout di sospensione",
[_L_APP_SET_LANGUAGE] = "Lingua",
[_L_APP_SET_GO_SLEEP] = "",
[_L_APP_SET_DFU] = "Aggiornamento firmware",
[_L_APP_SET_REBOOT] = "Riavvio del sistema",
[_L_APP_SET_RESET_DEFAULT] = "Ripristina impostazioni predefinite",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/ja_JP.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const char * const lang_ja_JP[_L_COUNT] = {
[_L_APP_SET_HIBERNATE] = "高速起動",
[_L_APP_SET_SLEEP_TIMEOUT] = "スリープタイムアウト",
[_L_APP_SET_LANGUAGE] = "言語",
[_L_APP_SET_GO_SLEEP] = "",
[_L_APP_SET_DFU] = "ファームウェア更新",
[_L_APP_SET_REBOOT] = "システム再起動",
[_L_APP_SET_RESET_DEFAULT] = "デフォルト設定に戻す",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/nl_NL.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const char * const lang_nl_NL[_L_COUNT] = {
[_L_APP_SET_HIBERNATE] = "Snel Ontwaken",
[_L_APP_SET_SLEEP_TIMEOUT] = "Time-out Slaapstand",
[_L_APP_SET_LANGUAGE] = "Taal",
[_L_APP_SET_GO_SLEEP] = "",
[_L_APP_SET_DFU] = "Firmware Bijwerken",
[_L_APP_SET_REBOOT] = "Systeem Herstarten",
[_L_APP_SET_RESET_DEFAULT] = "Terugzetten Naar Standaardwaarden",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/pt_BR.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const char * const lang_pt_BR[_L_COUNT] = {
[_L_APP_SET_HIBERNATE] = "Despertar Rápido",
[_L_APP_SET_SLEEP_TIMEOUT] = "Tempo Limite de Suspensão",
[_L_APP_SET_LANGUAGE] = "Idioma",
[_L_APP_SET_GO_SLEEP] = "",
[_L_APP_SET_DFU] = "Atualização de Firmware",
[_L_APP_SET_REBOOT] = "Reinicialização do Sistema",
[_L_APP_SET_RESET_DEFAULT] = "Restaurar Configurações Padrão",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/ru_RU.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const char * const lang_ru_RU[_L_COUNT] = {
[_L_APP_SET_HIBERNATE] = "Гибернация",
[_L_APP_SET_SLEEP_TIMEOUT] = "Таймаут сна",
[_L_APP_SET_LANGUAGE] = "Язык",
[_L_APP_SET_GO_SLEEP] = "",
[_L_APP_SET_DFU] = "Обновление ПО",
[_L_APP_SET_REBOOT] = "Перезагрузка",
[_L_APP_SET_RESET_DEFAULT] = "Сброс настроек",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/string_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ typedef enum {
_L_APP_SET_HIBERNATE,
_L_APP_SET_SLEEP_TIMEOUT,
_L_APP_SET_LANGUAGE,
_L_APP_SET_GO_SLEEP,
_L_APP_SET_DFU,
_L_APP_SET_REBOOT,
_L_APP_SET_RESET_DEFAULT,
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/zh_Hans.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const char * const lang_zh_Hans[_L_COUNT] = {
[_L_APP_SET_HIBERNATE] = "快速唤醒",
[_L_APP_SET_SLEEP_TIMEOUT] = "休眠时间",
[_L_APP_SET_LANGUAGE] = "系统语言",
[_L_APP_SET_GO_SLEEP] = "进入休眠",
[_L_APP_SET_DFU] = "固件更新",
[_L_APP_SET_REBOOT] = "重启设备",
[_L_APP_SET_RESET_DEFAULT] = "重置默认配置",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/zh_TW.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const char * const lang_zh_TW[_L_COUNT] = {
[_L_APP_SET_HIBERNATE] = "快速喚醒",
[_L_APP_SET_SLEEP_TIMEOUT] = "休眠時間",
[_L_APP_SET_LANGUAGE] = "系統語言",
[_L_APP_SET_GO_SLEEP] = "進入休眠",
[_L_APP_SET_DFU] = "軟體升級",
[_L_APP_SET_REBOOT] = "重啟設備",
[_L_APP_SET_RESET_DEFAULT] = "重置默認配置",
Expand Down
Loading

0 comments on commit 1dd3ec4

Please sign in to comment.