feat: Splash screen delay opt for colorlcd, startup sound disable opt (#3451)

* Enable startup splash screen duration for color LCD radios.
Add option to disable startup sound.
Add Companion support for changes.

* Add translation string for Hebrew language file.

* Fix rebase.

* chore: Add T20

* Update translations.

* Update translations.

* Update translations.

* Update translations.

* Right justify radio setup controls.

* Use longer translations for all radios.

* Enable splash screen timeout for NV14/EL18.

* Suspend watchdog timer to prevent EM if long splash display time selected.

* Simplify SPLASH_TIMEOUT code.

* Use WDG_RESET instead of watchdogSuspend.

---------

Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
philmoz
2023-07-30 11:58:28 +10:00
committed by GitHub
co-authored by Phil Mitchell Peter Feerick
parent ca025e849f
commit 9e7a331fa6
40 changed files with 996 additions and 875 deletions
+20 -3
View File
@@ -706,10 +706,27 @@ void RadioSetupPage::build(FormWindow * window)
{STR_ENABLED_FEATURES, [](){new ViewOptionsPage();}},
});
// Splash screen
auto line = window->newLine(&grid);
new StaticText(line, rect_t{}, STR_SPLASHSCREEN, 0, COLOR_THEME_PRIMARY1);
new Choice(line, rect_t{}, STR_SPLASHSCREEN_DELAYS, 0, 7,
[=]() -> int32_t {
return 3 - g_eeGeneral.splashMode;
},
[=](int32_t newValue) {
g_eeGeneral.splashMode = 3 - newValue;
SET_DIRTY();
});
// Play startup sound
line = window->newLine(&grid);
new StaticText(line, rect_t{}, STR_PLAY_HELLO, 0, COLOR_THEME_PRIMARY1);
new CheckBox(line, rect_t{}, GET_SET_INVERTED(g_eeGeneral.dontPlayHello));
#if defined(PWR_BUTTON_PRESS)
// Pwr Off Delay
{
auto line = window->newLine(&grid);
line = window->newLine(&grid);
new StaticText(line, rect_t{}, STR_PWR_OFF_DELAY, 0, COLOR_THEME_PRIMARY1);
new Choice(line, rect_t{}, STR_PWR_OFF_DELAYS, 0, 3,
[=]() -> int32_t {
@@ -725,7 +742,7 @@ void RadioSetupPage::build(FormWindow * window)
#if defined(PXX2)
// Owner ID
{
auto line = window->newLine(&grid);
line = window->newLine(&grid);
new StaticText(line, rect_t{}, STR_OWNER_ID, 0, COLOR_THEME_PRIMARY1);
new RadioTextEdit(line, rect_t{}, g_eeGeneral.ownerRegistrationID,
PXX2_LEN_REGISTRATION_ID);
@@ -733,7 +750,7 @@ void RadioSetupPage::build(FormWindow * window)
#endif
// Country code
auto line = window->newLine(&grid);
line = window->newLine(&grid);
new StaticText(line, rect_t{}, STR_COUNTRY_CODE, 0, COLOR_THEME_PRIMARY1);
new Choice(line, rect_t{}, STR_COUNTRY_CODES, 0, 2, GET_SET_DEFAULT(g_eeGeneral.countryCode));