feat: Support all current timezones for GPS (#3406)

* Support all current timezones.

* Fix function name and calculation for timezone offset.

* Allow setting any time offset value from -12 to +14 in 15 minutes increments.

* Alternate timezone editor in Companion (from elecpower).

* Fix compiler warning.

* chore: Add the T20
This commit is contained in:
philmoz
2023-07-16 14:02:27 +10:00
committed by GitHub
parent 286ae00678
commit bd92f70056
27 changed files with 223 additions and 42 deletions
+12 -3
View File
@@ -599,9 +599,18 @@ void menuRadioSetup(event_t event)
#if defined(GPS)
case ITEM_RADIO_SETUP_TIMEZONE:
lcdDrawTextAlignedLeft(y, STR_TIMEZONE);
lcdDrawNumber(RADIO_SETUP_2ND_COLUMN, y, g_eeGeneral.timezone, attr|LEFT);
if (attr) CHECK_INCDEC_GENVAR(event, g_eeGeneral.timezone, -12, 12);
{
lcdDrawTextAlignedLeft(y, STR_TIMEZONE);
int tzIndex = timezoneIndex(g_eeGeneral.timezone, g_eeGeneral.timezoneMinutes);
lcdDrawText(RADIO_SETUP_2ND_COLUMN, y, timezoneDisplay(tzIndex).c_str(), attr);
if (attr) {
tzIndex = checkIncDec(event, tzIndex, minTimezone(), maxTimezone(), EE_GENERAL);
if (checkIncDec_Ret) {
g_eeGeneral.timezone = timezoneHour(tzIndex);
g_eeGeneral.timezoneMinutes = timezoneMinute(tzIndex);
}
}
}
break;
case ITEM_RADIO_SETUP_ADJUST_RTC: