feat(color): Convert top bar display in main view into widgets (#3700)
* Convert radio info (USB, volume, signal strength), date/time and internal GPS display from top bar into widgets. * Fix B&W build.
This commit is contained in:
@@ -139,6 +139,28 @@ static void sortMixerLines()
|
||||
|
||||
void postModelLoad(bool alarms)
|
||||
{
|
||||
#if defined(COLORLCD)
|
||||
// Load 'date time' widget if slot is empty
|
||||
if (g_model.topbarData.zones[MAX_TOPBAR_ZONES-1].widgetName[0] == 0) {
|
||||
strcpy(g_model.topbarData.zones[MAX_TOPBAR_ZONES-1].widgetName, "Date Time");
|
||||
g_model.topbarData.zones[MAX_TOPBAR_ZONES-1].widgetData.options[0].type = ZOV_Color;
|
||||
g_model.topbarData.zones[MAX_TOPBAR_ZONES-1].widgetData.options[0].value.unsignedValue = 0xFFFFFF;
|
||||
storageDirty(EE_MODEL);
|
||||
}
|
||||
// Load 'radio info' widget if slot is empty
|
||||
if (g_model.topbarData.zones[MAX_TOPBAR_ZONES-2].widgetName[0] == 0) {
|
||||
strcpy(g_model.topbarData.zones[MAX_TOPBAR_ZONES-2].widgetName, "Radio Info");
|
||||
storageDirty(EE_MODEL);
|
||||
}
|
||||
#if defined(INTERNAL_GPS)
|
||||
// Load 'internal gps' widget if slot is empty
|
||||
if (g_model.topbarData.zones[MAX_TOPBAR_ZONES-3].widgetName[0] == 0) {
|
||||
strcpy(g_model.topbarData.zones[MAX_TOPBAR_ZONES-3].widgetName, "Internal GPS");
|
||||
storageDirty(EE_MODEL);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Convert 'noGlobalFunctions' to 'radioGFDisabled'
|
||||
// TODO: Remove sometime in the future (and remove 'noGlobalFunctions' property)
|
||||
if (g_model.noGlobalFunctions) {
|
||||
|
||||
Reference in New Issue
Block a user