ui: gps: added indication for no GPS device detected
Clearly show on UI the case when no GPS receiver has been detected in the hardware. Previously either the "GPS off" or "No fix" strings where shown also in case of no GPS, causing ambiguity.
This commit is contained in:
parent
44d0774b39
commit
40ff9baa47
|
|
@ -94,6 +94,7 @@ const stringsTable_t englishStrings =
|
|||
.broadcast = "ALL",
|
||||
.radioSettings = "Radio Settings",
|
||||
.frequencyOffset = "Frequency Offset",
|
||||
.macroLatching = "Macro Latching"
|
||||
.macroLatching = "Macro Latching",
|
||||
.noGps = "No GPS",
|
||||
};
|
||||
#endif // ENGLISHSTRINGS_H
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ const stringsTable_t spanishStrings =
|
|||
.broadcast = "TODOS",
|
||||
.radioSettings = "Ajustes de Radio",
|
||||
.frequencyOffset = "Offset de frecuencia",
|
||||
.macroLatching = "Macro Latching"
|
||||
.macroLatching = "Macro Latching",
|
||||
.noGps = "Ningún GPS",
|
||||
};
|
||||
#endif // SPANISHSTRINGS_H
|
||||
|
|
|
|||
|
|
@ -99,6 +99,7 @@ typedef struct
|
|||
const char* radioSettings;
|
||||
const char* frequencyOffset;
|
||||
const char* macroLatching;
|
||||
const char* noGps;
|
||||
}
|
||||
stringsTable_t;
|
||||
|
||||
|
|
|
|||
|
|
@ -638,7 +638,10 @@ void _ui_drawMenuGPS()
|
|||
color_white, currentLanguage->gps);
|
||||
point_t fix_pos = {layout.line2_pos.x, CONFIG_SCREEN_HEIGHT * 2 / 5};
|
||||
// Print GPS status, if no fix, hide details
|
||||
if(!last_state.settings.gps_enabled)
|
||||
if(!last_state.gpsDetected)
|
||||
gfx_print(fix_pos, layout.line3_large_font, TEXT_ALIGN_CENTER,
|
||||
color_white, currentLanguage->noGps);
|
||||
else if(!last_state.settings.gps_enabled)
|
||||
gfx_print(fix_pos, layout.line3_large_font, TEXT_ALIGN_CENTER,
|
||||
color_white, currentLanguage->gpsOff);
|
||||
else if (last_state.gps_data.fix_quality == 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue