fix(fw): compilation without AUDIO (#5022)
This commit is contained in:
@@ -197,8 +197,10 @@ void menuStatisticsDebug(event_t event)
|
||||
lcdDrawNumber(MENU_DEBUG_COL1_OFS, y, menusStack.available(), LEFT);
|
||||
lcdDrawText(lcdLastRightPos, y, "/");
|
||||
lcdDrawNumber(lcdLastRightPos, y, mixerStack.available(), LEFT);
|
||||
#if defined(AUDIO)
|
||||
lcdDrawText(lcdLastRightPos, y, "/");
|
||||
lcdDrawNumber(lcdLastRightPos, y, audioStack.available(), LEFT);
|
||||
#endif
|
||||
y += FH;
|
||||
|
||||
#if defined(DEBUG_LATENCY)
|
||||
|
||||
@@ -191,8 +191,10 @@ void menuStatisticsDebug(event_t event)
|
||||
lcdDrawNumber(lcdLastRightPos, y, menusStack.available(), LEFT);
|
||||
lcdDrawText(lcdLastRightPos+2, y+1, "[X]", SMLSIZE);
|
||||
lcdDrawNumber(lcdLastRightPos, y, mixerStack.available(), LEFT);
|
||||
#if defined(AUDIO)
|
||||
lcdDrawText(lcdLastRightPos+2, y+1, "[A]", SMLSIZE);
|
||||
lcdDrawNumber(lcdLastRightPos, y, audioStack.available(), LEFT);
|
||||
#endif
|
||||
lcdDrawText(lcdLastRightPos+2, y+1, "[I]", SMLSIZE);
|
||||
lcdDrawNumber(lcdLastRightPos, y, mainStackAvailable(), LEFT);
|
||||
y += FH;
|
||||
|
||||
@@ -346,9 +346,11 @@ void DebugViewPage::build(Window* window)
|
||||
new DebugInfoNumber<uint32_t>(
|
||||
line, rect_t{0, 0, DBG_B_WIDTH, DBG_B_HEIGHT},
|
||||
[] { return mixerStack.available(); }, STR_STACK_MIX);
|
||||
#if defined(AUDIO)
|
||||
new DebugInfoNumber<uint32_t>(
|
||||
line, rect_t{0, 0, DBG_B_WIDTH, DBG_B_HEIGHT},
|
||||
[] { return audioStack.available(); }, STR_STACK_AUDIO);
|
||||
#endif
|
||||
|
||||
#if defined(DEBUG_LATENCY)
|
||||
line = window->newLine(grid2);
|
||||
|
||||
@@ -55,6 +55,7 @@ class RadioInfoWidget : public TopBarWidget
|
||||
COLOR_THEME_PRIMARY2);
|
||||
usbIcon->hide();
|
||||
|
||||
#if defined(AUDIO)
|
||||
audioScale =
|
||||
new StaticIcon(this, W_AUDIO_X + 15, 2, ICON_TOPMENU_VOLUME_SCALE,
|
||||
COLOR_THEME_PRIMARY3);
|
||||
@@ -66,6 +67,7 @@ class RadioInfoWidget : public TopBarWidget
|
||||
audioVol[i]->hide();
|
||||
}
|
||||
audioVol[0]->show();
|
||||
#endif
|
||||
|
||||
batteryIcon = new StaticIcon(this, W_AUDIO_X, 25, ICON_TOPMENU_TXBATT,
|
||||
COLOR_THEME_PRIMARY2);
|
||||
@@ -130,6 +132,7 @@ class RadioInfoWidget : public TopBarWidget
|
||||
logsIcon->show(!usbPlugged() && isFunctionActive(FUNCTION_LOGS) &&
|
||||
BLINK_ON_PHASE);
|
||||
|
||||
#if defined(AUDIO)
|
||||
/* Audio volume */
|
||||
uint8_t vol = 4;
|
||||
if (requiredSpeakerVolume == 0 || g_eeGeneral.beepMode == e_mode_quiet)
|
||||
@@ -145,6 +148,7 @@ class RadioInfoWidget : public TopBarWidget
|
||||
audioVol[lastVol]->hide();
|
||||
lastVol = vol;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(USB_CHARGER)
|
||||
batteryChargeIcon->show(usbChargerLed());
|
||||
@@ -193,8 +197,10 @@ class RadioInfoWidget : public TopBarWidget
|
||||
uint8_t lastRSSI = 0;
|
||||
StaticIcon* logsIcon;
|
||||
StaticIcon* usbIcon;
|
||||
#if defined(AUDIO)
|
||||
StaticIcon* audioScale;
|
||||
StaticIcon* audioVol[5];
|
||||
#endif
|
||||
StaticIcon* batteryIcon;
|
||||
lv_obj_t* batteryFill = nullptr;
|
||||
lv_obj_t* rssiBars[5] = {nullptr};
|
||||
|
||||
Reference in New Issue
Block a user