Merge pull request #3756 from opentx/projectkk2glider/gps_clock_to_rtc_improvements

Projectkk2glider/gps clock to rtc improvements
This commit is contained in:
Bertrand Songis
2016-09-05 19:44:09 +02:00
committed by GitHub
12 changed files with 264 additions and 256 deletions
+4 -3
View File
@@ -75,6 +75,7 @@ enum MenuModelTelemetryFrskyItems {
#define TELEM_COL2 200
#define TELEM_COL3 275
#define TELEM_COL4 350
#define TELEM_COL5 425
#define IF_FAS_OFFSET(x) x,
#define IS_RANGE_DEFINED(k) (g_model.frsky.channels[k].ratio > 0)
@@ -443,11 +444,11 @@ bool menuModelTelemetryFrsky(event_t event)
// Spektrum does not (yet?) really support multiple sensor of the same type. But a lot of
// different sensor display the same information (e.g. voltage, capacity). Show the id
// of the sensor in the overview to ease figuring out what sensors belong together
lcdDrawHexNumber(TELEM_COL4, y, sensor->id, LEFT);
lcdDrawHexNumber(TELEM_COL5, y, sensor->id, LEFT);
} else
#endif
if (sensor->type == TELEM_TYPE_CUSTOM && !g_model.ignoreSensorIds) {
lcdDrawNumber(TELEM_COL4, y, sensor->instance, LEFT);
lcdDrawNumber(TELEM_COL5, y, sensor->instance, LEFT);
}
if (attr) {
s_editMode = 0;
@@ -477,7 +478,7 @@ bool menuModelTelemetryFrsky(event_t event)
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_TELEMETRY_SENSORS);
lcdDrawText(TELEM_COL2, y, STR_VALUE, 0);
if (!g_model.ignoreSensorIds && !IS_SPEKTRUM_PROTOCOL()) {
lcdDrawText(TELEM_COL4, y, STR_ID, 0);
lcdDrawText(TELEM_COL5, y, STR_ID, 0);
}
break;
+7 -1
View File
@@ -74,6 +74,7 @@ enum menuRadioSetupItems {
// CASE_SPLASH_PARAM(ITEM_SETUP_DISABLE_SPLASH)
CASE_GPS(ITEM_SETUP_LABEL_GPS)
CASE_GPS(ITEM_SETUP_TIMEZONE)
CASE_GPS(ITEM_SETUP_ADJUST_RTC)
CASE_GPS(ITEM_SETUP_GPSFORMAT)
CASE_PXX(ITEM_SETUP_COUNTRYCODE)
ITEM_SETUP_LANGUAGE,
@@ -115,7 +116,7 @@ bool menuRadioSetup(event_t event)
CASE_HAPTIC(LABEL(HAPTIC)) CASE_HAPTIC(0) CASE_HAPTIC(0) CASE_HAPTIC(0)
LABEL(ALARMS), 0, 0, 0,
LABEL(BACKLIGHT), 0, 0, 0, 0, 0,
CASE_GPS(LABEL(GPS)) CASE_GPS(0) CASE_GPS(0)
CASE_GPS(LABEL(GPS)) CASE_GPS(0) CASE_GPS(0) CASE_GPS(0)
CASE_PXX(0) 0, 0, 0, 0, 0, 0, 1/*to force edit mode*/ });
if (event == EVT_ENTRY) {
@@ -417,6 +418,11 @@ bool menuRadioSetup(event_t event)
if (attr) CHECK_INCDEC_GENVAR(event, g_eeGeneral.timezone, -12, 12);
break;
case ITEM_SETUP_ADJUST_RTC:
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_ADJUST_RTC);
g_eeGeneral.adjustRTC = editCheckBox(g_eeGeneral.adjustRTC, RADIO_SETUP_2ND_COLUMN, y, attr, event ) ;
break;
case ITEM_SETUP_GPSFORMAT:
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_GPSCOORD);
g_eeGeneral.gpsFormat = editChoice(RADIO_SETUP_2ND_COLUMN, y, STR_GPSFORMAT, g_eeGeneral.gpsFormat, 0, 1, attr, event);