Fixed colors in Radio menus

This commit is contained in:
jfrickmann
2021-08-28 17:03:12 -04:00
parent 5fd78ce0d7
commit 29639d76ab
8 changed files with 117 additions and 124 deletions
+7 -12
View File
@@ -101,12 +101,10 @@ class ScriptEditWindow : public Page {
ScriptInputsOutputs& sio = scriptInputsOutputs[idx];
if (sio.inputsCount > 0) {
new Subtitle(window, grid.getLineSlot(), STR_INPUTS);
new Subtitle(window, grid.getLineSlot(), STR_INPUTS, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
auto gInputs =
new FormGroup(window, grid.getFieldSlot(),
FORM_BORDER_FOCUS_ONLY | PAINT_CHILDREN_FIRST);
auto gInputs = new FormGroup(window, grid.getFieldSlot(), FORM_BORDER_FOCUS_ONLY | PAINT_CHILDREN_FIRST);
GridLayout inputsGrid(gInputs);
for (int i = 0; i < sio.inputsCount; i++) {
@@ -128,7 +126,7 @@ class ScriptEditWindow : public Page {
}
if (sio.outputsCount > 0) {
new Subtitle(window, grid.getLabelSlot(), STR_OUTPUTS);
new Subtitle(window, grid.getLabelSlot(), STR_OUTPUTS, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
auto gOutputs =
@@ -140,12 +138,10 @@ class ScriptEditWindow : public Page {
ScriptOutput* so = &(sio.outputs[i]);
new DynamicText(gOutputs, outputsGrid.getLabelSlot(), [=]() {
char s[16];
getSourceString(s,
MIXSRC_FIRST_LUA + (idx * MAX_SCRIPT_OUTPUTS) + i);
getSourceString(s, MIXSRC_FIRST_LUA + (idx * MAX_SCRIPT_OUTPUTS) + i);
return std::string(s, sizeof(s) - 1);
});
new DynamicNumber<int>(gOutputs, outputsGrid.getFieldSlot(),
[=]() { return calcRESXto1000(so->value); });
}, COLOR_THEME_PRIMARY1);
new DynamicNumber<int>(gOutputs, outputsGrid.getFieldSlot(), [=]() { return calcRESXto1000(so->value); }, COLOR_THEME_PRIMARY1);
outputsGrid.nextLine();
}
@@ -200,8 +196,7 @@ class ScriptLineButton : public Button
switch (runtimeData->state) {
case SCRIPT_SYNTAX_ERROR:
dc->drawSizedText(x, y, SCRIPT_STATUS_ERROR,
sizeof(SCRIPT_STATUS_ERROR), textColor);
dc->drawSizedText(x, y, SCRIPT_STATUS_ERROR, sizeof(SCRIPT_STATUS_ERROR), textColor);
break;
default:
dc->drawNumber(x, y, runtimeData->instructions, textColor, 0, nullptr, "%");
+1 -1
View File
@@ -180,7 +180,7 @@ class SensorEditWindow : public Page {
new StaticText(sensorParametersWindow, grid.getLabelSlot(), STR_ID, 0, COLOR_THEME_PRIMARY1);
auto hex = new NumberEdit(sensorParametersWindow, grid.getFieldSlot(2, 0), 0, 0xFFFF, GET_SET_DEFAULT(sensor->id));
hex->setDisplayHandler([](BitmapBuffer * dc, LcdFlags flags, int32_t value) {
drawHexNumber(dc, FIELD_PADDING_LEFT, FIELD_PADDING_TOP, value, 0);
drawHexNumber(dc, FIELD_PADDING_LEFT, FIELD_PADDING_TOP, value, flags);
});
new NumberEdit(sensorParametersWindow, grid.getFieldSlot(2, 1), 0, 0xff, GET_SET_DEFAULT(sensor->instance));
grid.nextLine();
+28 -30
View File
@@ -37,7 +37,7 @@
class SwitchDynamicLabel: public StaticText {
public:
SwitchDynamicLabel(Window * parent, const rect_t & rect, uint8_t index):
StaticText(parent, rect),
StaticText(parent, rect, "", 0, COLOR_THEME_PRIMARY1),
index(index)
{
update();
@@ -108,7 +108,7 @@ class BluetoothConfigWindow : public FormGroup
#endif
clear();
new StaticText(this, grid.getLabelSlot(true), STR_MODE);
new StaticText(this, grid.getLabelSlot(true), STR_MODE, 0, COLOR_THEME_PRIMARY1);
btMode = new Choice(this, grid.getFieldSlot(), STR_BLUETOOTH_MODES, BLUETOOTH_OFF, BLUETOOTH_TRAINER, GET_DEFAULT(g_eeGeneral.bluetoothMode), [=](int32_t newValue) {
g_eeGeneral.bluetoothMode = newValue;
update();
@@ -120,23 +120,23 @@ class BluetoothConfigWindow : public FormGroup
if (g_eeGeneral.bluetoothMode != BLUETOOTH_OFF) {
// Pin code (displayed for information only, not editable)
if (g_eeGeneral.bluetoothMode == BLUETOOTH_TELEMETRY) {
new StaticText(this, grid.getLabelSlot(true), STR_BLUETOOTH_PIN_CODE);
new StaticText(this, grid.getFieldSlot(), "000000");
new StaticText(this, grid.getLabelSlot(true), STR_BLUETOOTH_PIN_CODE, 0, COLOR_THEME_PRIMARY1);
new StaticText(this, grid.getFieldSlot(), "000000", 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
}
// Local MAC
new StaticText(this, grid.getLabelSlot(true), STR_BLUETOOTH_LOCAL_ADDR);
new StaticText(this, grid.getFieldSlot(), bluetooth.localAddr[0] == '\0' ? "---" : bluetooth.localAddr);
new StaticText(this, grid.getLabelSlot(true), STR_BLUETOOTH_LOCAL_ADDR, 0, COLOR_THEME_PRIMARY1);
new StaticText(this, grid.getFieldSlot(), bluetooth.localAddr[0] == '\0' ? "---" : bluetooth.localAddr, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
// Remote MAC
new StaticText(this, grid.getLabelSlot(true), STR_BLUETOOTH_DIST_ADDR);
new StaticText(this, grid.getFieldSlot(), bluetooth.distantAddr[0] == '\0' ? "---" : bluetooth.distantAddr);
new StaticText(this, grid.getLabelSlot(true), STR_BLUETOOTH_DIST_ADDR, 0, COLOR_THEME_PRIMARY1);
new StaticText(this, grid.getFieldSlot(), bluetooth.distantAddr[0] == '\0' ? "---" : bluetooth.distantAddr, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
// BT radio name
new StaticText(this, grid.getLabelSlot(true), STR_NAME);
new StaticText(this, grid.getLabelSlot(true), STR_NAME, 0, COLOR_THEME_PRIMARY1);
new RadioTextEdit(this, grid.getFieldSlot(), g_eeGeneral.bluetoothName, LEN_BLUETOOTH_NAME);
grid.nextLine();
}
@@ -160,7 +160,7 @@ void RadioHardwarePage::build(FormWindow * window)
grid.spacer(PAGE_PADDING);
// Calibration
new StaticText(window, grid.getLabelSlot(), STR_INPUTS, 0, FONT(BOLD));
new StaticText(window, grid.getLabelSlot(), STR_INPUTS, 0, COLOR_THEME_PRIMARY1 | FONT(BOLD));
auto calib = new TextButton(window, grid.getFieldSlot(), STR_CALIBRATION);
calib->setPressHandler([=]() -> uint8_t {
auto calibrationPage = new RadioCalibrationPage();
@@ -172,19 +172,19 @@ void RadioHardwarePage::build(FormWindow * window)
grid.nextLine();
// Sticks
new Subtitle(window, grid.getLineSlot(), STR_STICKS);
new Subtitle(window, grid.getLineSlot(), STR_STICKS, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
for (int i = 0; i < NUM_STICKS; i++) {
new StaticText(window, grid.getLabelSlot(true), TEXT_AT_INDEX(STR_VSRCRAW, (i + 1)));
new StaticText(window, grid.getLabelSlot(true), TEXT_AT_INDEX(STR_VSRCRAW, (i + 1)), 0, COLOR_THEME_PRIMARY1);
new RadioTextEdit(window, grid.getFieldSlot(2,0), g_eeGeneral.anaNames[i], LEN_ANA_NAME);
grid.nextLine();
}
// Pots
new Subtitle(window, grid.getLineSlot(), STR_POTS);
new Subtitle(window, grid.getLineSlot(), STR_POTS, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
for (int i = 0; i < NUM_POTS; i++) {
new StaticText(window, grid.getLabelSlot(true), TEXT_AT_INDEX(STR_VSRCRAW, (i + NUM_STICKS + 1)));
new StaticText(window, grid.getLabelSlot(true), TEXT_AT_INDEX(STR_VSRCRAW, (i + NUM_STICKS + 1)), 0, COLOR_THEME_PRIMARY1);
new RadioTextEdit(window, grid.getFieldSlot(2,0), g_eeGeneral.anaNames[i + NUM_STICKS], LEN_ANA_NAME);
new Choice(window, grid.getFieldSlot(2,1), STR_POTTYPES, POT_NONE, POT_WITHOUT_DETENT,
[=]() -> int {
@@ -198,14 +198,12 @@ void RadioHardwarePage::build(FormWindow * window)
}
// Sliders
new Subtitle(window, grid.getLineSlot(), STR_SLIDERS);
new Subtitle(window, grid.getLineSlot(), STR_SLIDERS, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
for (int i = 0; i < NUM_SLIDERS; i++) {
const int idx = i + NUM_STICKS + NUM_POTS;
new StaticText(window, grid.getLabelSlot(true),
TEXT_AT_INDEX(STR_VSRCRAW, idx + 1));
new RadioTextEdit(window, grid.getFieldSlot(2, 0),
g_eeGeneral.anaNames[idx], LEN_ANA_NAME);
new StaticText(window, grid.getLabelSlot(true), TEXT_AT_INDEX(STR_VSRCRAW, idx + 1), 0, COLOR_THEME_PRIMARY1);
new RadioTextEdit(window, grid.getFieldSlot(2, 0), g_eeGeneral.anaNames[idx], LEN_ANA_NAME);
new Choice(
window, grid.getFieldSlot(2, 1), STR_SLIDERTYPES, SLIDER_NONE,
SLIDER_WITH_DETENT,
@@ -223,7 +221,7 @@ void RadioHardwarePage::build(FormWindow * window)
}
// Switches
new Subtitle(window, grid.getLineSlot(), STR_SWITCHES);
new Subtitle(window, grid.getLineSlot(), STR_SWITCHES, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
for (int i = 0; i < NUM_SWITCHES; i++) {
new SwitchDynamicLabel(window, grid.getLabelSlot(true), i);
@@ -241,7 +239,7 @@ void RadioHardwarePage::build(FormWindow * window)
}
// Bat calibration
new StaticText(window, grid.getLabelSlot(), STR_BATT_CALIB);
new StaticText(window, grid.getLabelSlot(), STR_BATT_CALIB, 0, COLOR_THEME_PRIMARY1);
auto batCal = new NumberEdit(window, grid.getFieldSlot(1,0), -127, 127, GET_SET_DEFAULT(g_eeGeneral.txVoltageCalibration));
batCal->setDisplayHandler([](BitmapBuffer * dc, LcdFlags flags, int32_t value) {
dc->drawNumber(FIELD_PADDING_LEFT, FIELD_PADDING_TOP, getBatteryVoltage(), flags | PREC2, 0, nullptr, "V");
@@ -250,20 +248,20 @@ void RadioHardwarePage::build(FormWindow * window)
grid.nextLine();
// RTC Batt display
new StaticText(window, grid.getLabelSlot(), STR_RTC_BATT);
new StaticText(window, grid.getLabelSlot(), STR_RTC_BATT, 0, COLOR_THEME_PRIMARY1);
new DynamicNumber<uint16_t>(window, grid.getFieldSlot(1,0), [] {
return getRTCBatteryVoltage();
}, PREC2, nullptr, "V");
}, COLOR_THEME_PRIMARY1 | PREC2, nullptr, "V");
grid.nextLine();
// RTC Batt check enable
new StaticText(window, grid.getLabelSlot(), STR_RTC_CHECK);
new StaticText(window, grid.getLabelSlot(), STR_RTC_CHECK, 0, COLOR_THEME_PRIMARY1);
new CheckBox(window, grid.getFieldSlot(1,0), GET_SET_INVERTED(g_eeGeneral.disableRtcWarning ));
grid.nextLine();
#if defined(CROSSFIRE) && SPORT_MAX_BAUDRATE < 400000
// Max baud for external modules
new StaticText(window, grid.getLabelSlot(), STR_MAXBAUDRATE);
new StaticText(window, grid.getLabelSlot(), STR_MAXBAUDRATE, 0, COLOR_THEME_PRIMARY1);
new Choice(window, grid.getFieldSlot(1,0), STR_CRSF_BAUDRATE, 0, 1, GET_SET_DEFAULT(g_eeGeneral.telemetryBaudrate));
grid.nextLine();
#endif
@@ -271,14 +269,14 @@ void RadioHardwarePage::build(FormWindow * window)
#if defined(BLUETOOTH)
// Bluetooth mode
{
new Subtitle(window, grid.getLineSlot(), STR_BLUETOOTH);
new Subtitle(window, grid.getLineSlot(), STR_BLUETOOTH, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
grid.addWindow(new BluetoothConfigWindow(window, {0, grid.getWindowHeight(), LCD_W, 0}));
}
#endif
#if defined(AUX_SERIAL)
new StaticText(window, grid.getLabelSlot(), STR_AUX_SERIAL_MODE);
new StaticText(window, grid.getLabelSlot(), STR_AUX_SERIAL_MODE, 0, COLOR_THEME_PRIMARY1);
auto aux =
new Choice(window, grid.getFieldSlot(1, 0), STR_AUX_SERIAL_MODES, 0,
UART_MODE_MAX, GET_DEFAULT(g_eeGeneral.auxSerialMode),
@@ -292,7 +290,7 @@ void RadioHardwarePage::build(FormWindow * window)
#endif
#if defined(AUX2_SERIAL)
new StaticText(window, grid.getLabelSlot(), STR_AUX2_SERIAL_MODE);
new StaticText(window, grid.getLabelSlot(), STR_AUX2_SERIAL_MODE, 0, COLOR_THEME_PRIMARY1);
auto aux2 =
new Choice(window, grid.getFieldSlot(1, 0), STR_AUX_SERIAL_MODES, 0,
UART_MODE_MAX, GET_DEFAULT(g_eeGeneral.aux2SerialMode),
@@ -311,12 +309,12 @@ void RadioHardwarePage::build(FormWindow * window)
#endif
// ADC filter
new StaticText(window, grid.getLabelSlot(), STR_JITTER_FILTER);
new StaticText(window, grid.getLabelSlot(), STR_JITTER_FILTER, 0, COLOR_THEME_PRIMARY1);
new CheckBox(window, grid.getFieldSlot(1,0), GET_SET_INVERTED(g_eeGeneral.jitterFilter));
grid.nextLine();
// Debugs
new StaticText(window, grid.getLabelSlot(), STR_DEBUG, 0, FONT(BOLD));
new StaticText(window, grid.getLabelSlot(), STR_DEBUG, 0, COLOR_THEME_PRIMARY1 | FONT(BOLD));
auto debugAnas = new TextButton(window, grid.getFieldSlot(2, 0), STR_ANALOGS_BTN);
debugAnas->setPressHandler([=]() -> uint8_t {
auto debugAnalogsPage = new RadioAnalogsDiagsPage();
+44 -44
View File
@@ -52,7 +52,7 @@ class DateTimeWindow : public FormGroup {
FormGridLayout grid;
// Date
new StaticText(this, grid.getLabelSlot(), STR_DATE);
new StaticText(this, grid.getLabelSlot(), STR_DATE, 0, COLOR_THEME_PRIMARY1);
new NumberEdit(this, grid.getFieldSlot(3, 0), 2018, 2100,
[=]() -> int32_t {
struct gtm t;
@@ -105,7 +105,7 @@ class DateTimeWindow : public FormGroup {
grid.nextLine();
// Time
new StaticText(this, grid.getLabelSlot(), STR_TIME);
new StaticText(this, grid.getLabelSlot(), STR_TIME, 0, COLOR_THEME_PRIMARY1);
auto hour = new NumberEdit(this, grid.getFieldSlot(3, 0), 0, 24,
[=]() -> int32_t {
struct gtm t;
@@ -171,7 +171,7 @@ void RadioSetupPage::build(FormWindow * window)
grid.addWindow(timeWindow);
// Batt meter range - Range 3.0v to 16v
new StaticText(window, grid.getLabelSlot(), STR_BATTERY_RANGE);
new StaticText(window, grid.getLabelSlot(), STR_BATTERY_RANGE, 0, COLOR_THEME_PRIMARY1);
auto batMinEdit = new NumberEdit(window, grid.getFieldSlot(2, 0), -60 + 90, g_eeGeneral.vBatMax + 29 + 90, GET_SET_WITH_OFFSET(g_eeGeneral.vBatMin, 90), 0, PREC1);
batMinEdit->setSuffix("V");
auto batMaxEdit = new NumberEdit(window, grid.getFieldSlot(2, 1), g_eeGeneral.vBatMin - 29 + 120, 40 + 120, GET_SET_WITH_OFFSET(g_eeGeneral.vBatMax, 120), 0, PREC1);
@@ -190,31 +190,31 @@ void RadioSetupPage::build(FormWindow * window)
});
grid.nextLine();
new Subtitle(window, grid.getLabelSlot(), STR_SOUND_LABEL);
new Subtitle(window, grid.getLabelSlot(), STR_SOUND_LABEL, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
// Beeps mode
new StaticText(window, grid.getLabelSlot(true), STR_SPEAKER);
new StaticText(window, grid.getLabelSlot(true), STR_SPEAKER, 0, COLOR_THEME_PRIMARY1);
new Choice(window, grid.getFieldSlot(), STR_VBEEPMODE, -2, 1, GET_SET_DEFAULT(g_eeGeneral.beepMode));
grid.nextLine();
// Main volume
new StaticText(window, grid.getLabelSlot(true), STR_VOLUME);
new StaticText(window, grid.getLabelSlot(true), STR_VOLUME, 0, COLOR_THEME_PRIMARY1);
new Slider(window, grid.getFieldSlot(), -VOLUME_LEVEL_DEF, VOLUME_LEVEL_MAX-VOLUME_LEVEL_DEF, GET_SET_DEFAULT(g_eeGeneral.speakerVolume));
grid.nextLine();
// Beeps volume
new StaticText(window, grid.getLabelSlot(true), STR_BEEP_VOLUME);
new StaticText(window, grid.getLabelSlot(true), STR_BEEP_VOLUME, 0, COLOR_THEME_PRIMARY1);
new Slider(window, grid.getFieldSlot(), -2, +2, GET_SET_DEFAULT(g_eeGeneral.beepVolume));
grid.nextLine();
// Beeps length
new StaticText(window, grid.getLabelSlot(true), STR_BEEP_LENGTH);
new StaticText(window, grid.getLabelSlot(true), STR_BEEP_LENGTH, 0, COLOR_THEME_PRIMARY1);
new Slider(window, grid.getFieldSlot(), -2, +2, GET_SET_DEFAULT(g_eeGeneral.beepLength));
grid.nextLine();
// Beeps pitch
new StaticText(window, grid.getLabelSlot(true), STR_BEEP_PITCH);
new StaticText(window, grid.getLabelSlot(true), STR_BEEP_PITCH, 0, COLOR_THEME_PRIMARY1);
auto edit = new NumberEdit(window, grid.getFieldSlot(), 0, 300,
GET_DEFAULT(15 * g_eeGeneral.speakerPitch),
[=](int32_t newValue) {
@@ -227,26 +227,26 @@ void RadioSetupPage::build(FormWindow * window)
grid.nextLine();
// Wav volume
new StaticText(window, grid.getLabelSlot(true), STR_WAV_VOLUME);
new StaticText(window, grid.getLabelSlot(true), STR_WAV_VOLUME, 0, COLOR_THEME_PRIMARY1);
new Slider(window, grid.getFieldSlot(), -2, +2, GET_SET_DEFAULT(g_eeGeneral.wavVolume));
grid.nextLine();
// Background volume
new StaticText(window, grid.getLabelSlot(true), STR_BG_VOLUME);
new StaticText(window, grid.getLabelSlot(true), STR_BG_VOLUME, 0, COLOR_THEME_PRIMARY1);
new Slider(window, grid.getFieldSlot(), -2, +2, GET_SET_DEFAULT(g_eeGeneral.backgroundVolume));
grid.nextLine();
#if defined(VARIO)
{
new Subtitle(window, grid.getLabelSlot(), STR_VARIO);
new Subtitle(window, grid.getLabelSlot(), STR_VARIO, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
// Vario volume
new StaticText(window, grid.getLabelSlot(true), TR_VOLUME);
new StaticText(window, grid.getLabelSlot(true), TR_VOLUME, 0, COLOR_THEME_PRIMARY1);
new Slider(window, grid.getFieldSlot(), -2, +2, GET_SET_DEFAULT(g_eeGeneral.varioVolume));
grid.nextLine();
new StaticText(window, grid.getLabelSlot(true), STR_PITCH_AT_ZERO);
new StaticText(window, grid.getLabelSlot(true), STR_PITCH_AT_ZERO, 0, COLOR_THEME_PRIMARY1);
edit = new NumberEdit(window, grid.getFieldSlot(), VARIO_FREQUENCY_ZERO - 400, VARIO_FREQUENCY_ZERO + 400,
GET_DEFAULT(VARIO_FREQUENCY_ZERO + (g_eeGeneral.varioPitch * 10)),
SET_VALUE(g_eeGeneral.varioPitch, (newValue - VARIO_FREQUENCY_ZERO) / 10));
@@ -254,7 +254,7 @@ void RadioSetupPage::build(FormWindow * window)
edit->setSuffix("Hz");
grid.nextLine();
new StaticText(window, grid.getLabelSlot(true), STR_PITCH_AT_MAX);
new StaticText(window, grid.getLabelSlot(true), STR_PITCH_AT_MAX, 0, COLOR_THEME_PRIMARY1);
edit = new NumberEdit(window, grid.getFieldSlot(), 900, 2500,
GET_DEFAULT(VARIO_FREQUENCY_ZERO + (g_eeGeneral.varioPitch * 10) + VARIO_FREQUENCY_RANGE + (g_eeGeneral.varioRange * 10)),
SET_VALUE(g_eeGeneral.varioRange, (newValue - VARIO_FREQUENCY_ZERO - VARIO_FREQUENCY_RANGE) / 10 - g_eeGeneral.varioPitch ));
@@ -262,7 +262,7 @@ void RadioSetupPage::build(FormWindow * window)
edit->setSuffix("Hz");
grid.nextLine();
new StaticText(window, grid.getLabelSlot(true), STR_REPEAT_AT_ZERO);
new StaticText(window, grid.getLabelSlot(true), STR_REPEAT_AT_ZERO, 0, COLOR_THEME_PRIMARY1);
edit = new NumberEdit(window, grid.getFieldSlot(), 200, 1000,
GET_DEFAULT(VARIO_REPEAT_ZERO + (g_eeGeneral.varioRepeat * 10)),
SET_VALUE(g_eeGeneral.varioRepeat, (newValue - VARIO_REPEAT_ZERO) / 10));
@@ -274,21 +274,21 @@ void RadioSetupPage::build(FormWindow * window)
#if defined(HAPTIC)
{
new Subtitle(window, grid.getLabelSlot(), STR_HAPTIC_LABEL);
new Subtitle(window, grid.getLabelSlot(), STR_HAPTIC_LABEL, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
// Haptic mode
new StaticText(window, grid.getLabelSlot(true), STR_MODE);
new StaticText(window, grid.getLabelSlot(true), STR_MODE, 0, COLOR_THEME_PRIMARY1);
new Choice(window, grid.getFieldSlot(), STR_VBEEPMODE, -2, 1, GET_SET_DEFAULT(g_eeGeneral.hapticMode));
grid.nextLine();
// Haptic duration
new StaticText(window, grid.getLabelSlot(true), STR_LENGTH);
new StaticText(window, grid.getLabelSlot(true), STR_LENGTH, 0, COLOR_THEME_PRIMARY1);
new Slider(window, grid.getFieldSlot(), -2, +2, GET_SET_DEFAULT(g_eeGeneral.hapticLength));
grid.nextLine();
// Haptic strength
new StaticText(window, grid.getLabelSlot(true), STR_STRENGTH);
new StaticText(window, grid.getLabelSlot(true), STR_STRENGTH, 0, COLOR_THEME_PRIMARY1);
new Slider(window, grid.getFieldSlot(), -2, +2, GET_SET_DEFAULT(g_eeGeneral.hapticStrength));
grid.nextLine();
}
@@ -296,39 +296,39 @@ void RadioSetupPage::build(FormWindow * window)
// Alarms
{
new Subtitle(window, grid.getLabelSlot(), STR_ALARMS_LABEL);
new Subtitle(window, grid.getLabelSlot(), STR_ALARMS_LABEL, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
// Battery warning
new StaticText(window, grid.getLabelSlot(true), STR_BATTERYWARNING);
new StaticText(window, grid.getLabelSlot(true), STR_BATTERYWARNING, 0, COLOR_THEME_PRIMARY1);
edit = new NumberEdit(window, grid.getFieldSlot(), 30, 120, GET_SET_DEFAULT(g_eeGeneral.vBatWarn), 0, PREC1);
edit->setSuffix("V");
grid.nextLine();
// Inactivity alarm
new StaticText(window, grid.getLabelSlot(true), STR_INACTIVITYALARM);
new StaticText(window, grid.getLabelSlot(true), STR_INACTIVITYALARM, 0, COLOR_THEME_PRIMARY1);
edit = new NumberEdit(window, grid.getFieldSlot(), 0, 250, GET_SET_DEFAULT(g_eeGeneral.inactivityTimer));
edit->setSuffix("minutes");
grid.nextLine();
// Alarms warning
new StaticText(window, grid.getLabelSlot(true), STR_ALARMWARNING);
new StaticText(window, grid.getLabelSlot(true), STR_ALARMWARNING, 0, COLOR_THEME_PRIMARY1);
new CheckBox(window, grid.getFieldSlot(), GET_SET_INVERTED(g_eeGeneral.disableAlarmWarning));
grid.nextLine();
// RSSI shutdown alarm
new StaticText(window, grid.getLabelSlot(true), STR_RSSI_SHUTDOWN_ALARM);
new StaticText(window, grid.getLabelSlot(true), STR_RSSI_SHUTDOWN_ALARM, 0, COLOR_THEME_PRIMARY1);
new CheckBox(window, grid.getFieldSlot(), GET_SET_INVERTED(g_eeGeneral.disableRssiPoweroffAlarm));
grid.nextLine();
}
// Backlight
{
new Subtitle(window, grid.getLabelSlot(), STR_BACKLIGHT_LABEL);
new Subtitle(window, grid.getLabelSlot(), STR_BACKLIGHT_LABEL, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
// Backlight mode
new StaticText(window, grid.getLabelSlot(true), STR_MODE);
new StaticText(window, grid.getLabelSlot(true), STR_MODE, 0, COLOR_THEME_PRIMARY1);
new Choice(window, grid.getFieldSlot(2,0), STR_VBLMODE, e_backlight_mode_off, e_backlight_mode_on, GET_SET_DEFAULT(g_eeGeneral.backlightMode));
//grid.nextLine();
@@ -341,7 +341,7 @@ void RadioSetupPage::build(FormWindow * window)
grid.nextLine();
// Backlight ON bright
new StaticText(window, grid.getLabelSlot(true), STR_BLONBRIGHTNESS);
new StaticText(window, grid.getLabelSlot(true), STR_BLONBRIGHTNESS, 0, COLOR_THEME_PRIMARY1);
new Slider(window, grid.getFieldSlot(), BACKLIGHT_LEVEL_MIN, BACKLIGHT_LEVEL_MAX,
[=]() -> int32_t {
return BACKLIGHT_LEVEL_MAX - g_eeGeneral.backlightBright;
@@ -352,19 +352,19 @@ void RadioSetupPage::build(FormWindow * window)
grid.nextLine();
// Backlight OFF bright
new StaticText(window, grid.getLabelSlot(true), STR_BLOFFBRIGHTNESS);
new StaticText(window, grid.getLabelSlot(true), STR_BLOFFBRIGHTNESS, 0, COLOR_THEME_PRIMARY1);
new Slider(window, grid.getFieldSlot(), BACKLIGHT_LEVEL_MIN, BACKLIGHT_LEVEL_MAX, GET_SET_DEFAULT(g_eeGeneral.blOffBright));
grid.nextLine();
#if defined(KEYS_BACKLIGHT_GPIO)
// Keys backlight
new StaticText(window, grid.getLabelSlot(true), STR_KEYS_BACKLIGHT);
new StaticText(window, grid.getLabelSlot(true), STR_KEYS_BACKLIGHT, 0, COLOR_THEME_PRIMARY1);
new CheckBox(window, grid.getFieldSlot(), GET_SET_DEFAULT(g_eeGeneral.keysBacklight));
grid.nextLine();
#endif
// Flash beep
new StaticText(window, grid.getLabelSlot(true), STR_ALARM);
new StaticText(window, grid.getLabelSlot(true), STR_ALARM, 0, COLOR_THEME_PRIMARY1);
new CheckBox(window, grid.getFieldSlot(), GET_SET_DEFAULT(g_eeGeneral.alarmsFlash));
grid.nextLine();
}
@@ -372,7 +372,7 @@ void RadioSetupPage::build(FormWindow * window)
#if defined(PWR_BUTTON_PRESS)
// Pwr Off Delay
{
new StaticText(window, grid.getLabelSlot(), STR_PWR_OFF_DELAY);
new StaticText(window, grid.getLabelSlot(), STR_PWR_OFF_DELAY, 0, COLOR_THEME_PRIMARY1);
new Choice(window, grid.getFieldSlot(), STR_PWR_OFF_DELAYS, 0, 3,
[=]() -> int32_t {
return 2 - g_eeGeneral.pwrOffSpeed;
@@ -388,21 +388,21 @@ void RadioSetupPage::build(FormWindow * window)
#if defined(INTERNAL_GPS)
// GPS
{
new Subtitle(window, grid.getLabelSlot(), STR_GPS);
new Subtitle(window, grid.getLabelSlot(), STR_GPS, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
// Timezone
new StaticText(window, grid.getLabelSlot(true), STR_TIMEZONE);
new StaticText(window, grid.getLabelSlot(true), STR_TIMEZONE, 0, COLOR_THEME_PRIMARY1);
new NumberEdit(window, grid.getFieldSlot(), -12, 12, GET_SET_DEFAULT(g_eeGeneral.timezone));
grid.nextLine();
// Adjust RTC (from telemetry)
new StaticText(window, grid.getLabelSlot(true), STR_ADJUST_RTC);
new StaticText(window, grid.getLabelSlot(true), STR_ADJUST_RTC, 0, COLOR_THEME_PRIMARY1);
new CheckBox(window, grid.getFieldSlot(), GET_SET_DEFAULT(g_eeGeneral.adjustRTC));
grid.nextLine();
// GPS format
new StaticText(window, grid.getLabelSlot(true), STR_GPS_COORDS_FORMAT);
new StaticText(window, grid.getLabelSlot(true), STR_GPS_COORDS_FORMAT, 0, COLOR_THEME_PRIMARY1);
new Choice(window, grid.getFieldSlot(), STR_GPSFORMAT, 0, 1, GET_SET_DEFAULT(g_eeGeneral.gpsFormat));
grid.nextLine();
}
@@ -410,18 +410,18 @@ void RadioSetupPage::build(FormWindow * window)
#if defined(PXX2)
// Owner ID
new StaticText(window, grid.getLabelSlot(), STR_OWNER_ID);
new StaticText(window, grid.getLabelSlot(), STR_OWNER_ID, 0, COLOR_THEME_PRIMARY1);
new RadioTextEdit(window, grid.getFieldSlot(), g_eeGeneral.ownerRegistrationID, PXX2_LEN_REGISTRATION_ID);
grid.nextLine();
#endif
// Country code
new StaticText(window, grid.getLabelSlot(), STR_COUNTRY_CODE);
new StaticText(window, grid.getLabelSlot(), STR_COUNTRY_CODE, 0, COLOR_THEME_PRIMARY1);
new Choice(window, grid.getFieldSlot(), STR_COUNTRY_CODES, 0, 2, GET_SET_DEFAULT(g_eeGeneral.countryCode));
grid.nextLine();
// Audio language
new StaticText(window, grid.getLabelSlot(), STR_VOICE_LANGUAGE);
new StaticText(window, grid.getLabelSlot(), STR_VOICE_LANGUAGE, 0, COLOR_THEME_PRIMARY1);
auto choice = new Choice(window, grid.getFieldSlot(), 0, DIM(languagePacks) - 2, GET_VALUE(currentLanguagePackIdx),
[](uint8_t newValue) {
currentLanguagePackIdx = newValue;
@@ -434,7 +434,7 @@ void RadioSetupPage::build(FormWindow * window)
grid.nextLine();
// Imperial units
new StaticText(window, grid.getLabelSlot(), STR_UNITS_SYSTEM);
new StaticText(window, grid.getLabelSlot(), STR_UNITS_SYSTEM, 0, COLOR_THEME_PRIMARY1);
new Choice(window, grid.getFieldSlot(), STR_VUNITSSYSTEM, 0, 1, GET_SET_DEFAULT(g_eeGeneral.imperial));
grid.nextLine();
@@ -455,18 +455,18 @@ void RadioSetupPage::build(FormWindow * window)
#endif
// Switches delay
new StaticText(window, grid.getLabelSlot(), STR_SWITCHES_DELAY);
new StaticText(window, grid.getLabelSlot(), STR_SWITCHES_DELAY, 0, COLOR_THEME_PRIMARY1);
edit = new NumberEdit(window, grid.getFieldSlot(2, 0), -15, 100 - 15, GET_SET_VALUE_WITH_OFFSET(g_eeGeneral.switchesDelay, 15));
edit->setSuffix(std::string("0") + STR_MS);
grid.nextLine();
// USB mode
new StaticText(window, grid.getLabelSlot(), STR_USBMODE);
new StaticText(window, grid.getLabelSlot(), STR_USBMODE, 0, COLOR_THEME_PRIMARY1);
new Choice(window, grid.getFieldSlot(), STR_USBMODES, USB_UNSELECTED_MODE, USB_MAX_MODE, GET_SET_DEFAULT(g_eeGeneral.USBMode));
grid.nextLine();
// RX channel order
new StaticText(window, grid.getLabelSlot(), STR_RXCHANNELORD); // RAET->AETR
new StaticText(window, grid.getLabelSlot(), STR_RXCHANNELORD, 0, COLOR_THEME_PRIMARY1); // RAET->AETR
choice = new Choice(window, grid.getFieldSlot(), 0, 4*3*2 - 1, GET_SET_DEFAULT(g_eeGeneral.templateSetup));
choice->setTextHandler([](uint8_t value) {
char s[5];
@@ -479,7 +479,7 @@ void RadioSetupPage::build(FormWindow * window)
grid.nextLine();
// Stick mode
new StaticText(window, grid.getLabelSlot(), STR_MODE);
new StaticText(window, grid.getLabelSlot(), STR_MODE, 0, COLOR_THEME_PRIMARY1);
choice = new Choice(window, grid.getFieldSlot(), 0, 3, GET_DEFAULT(g_eeGeneral.stickMode),
[=](uint8_t newValue) {
pausePulses();
+6 -6
View File
@@ -113,7 +113,7 @@ void RadioToolsPage::rebuild(FormWindow * window)
label = getBasename(path);
}
auto txt = new StaticText(window, grid.getLabelSlot(), "lua",
BUTTON_BACKGROUND, CENTERED);
BUTTON_BACKGROUND, COLOR_THEME_PRIMARY1 | CENTERED);
std::string path_str(path);
auto b = new TextButton(
@@ -137,7 +137,7 @@ void RadioToolsPage::rebuild(FormWindow * window)
txt->setTextFlags(COLOR_THEME_PRIMARY2 | CENTERED);
} else {
txt->setBackgroundColor(COLOR_THEME_SECONDARY2);
txt->setTextFlags(CENTERED);
txt->setTextFlags(COLOR_THEME_PRIMARY1 | CENTERED);
}
txt->invalidate();
});
@@ -181,7 +181,7 @@ void RadioToolsPage::rebuild(FormWindow * window)
.information.modelID,
MODULE_OPTION_POWER_METER)) {
auto txt = new StaticText(window, grid.getLabelSlot(), "access",
BUTTON_BACKGROUND, CENTERED);
BUTTON_BACKGROUND, COLOR_THEME_PRIMARY1 | CENTERED);
auto b = new TextButton(
window, grid.getFieldSlot(1), STR_POWER_METER_INT,
[=]() -> uint8_t {
@@ -196,7 +196,7 @@ void RadioToolsPage::rebuild(FormWindow * window)
txt->setTextFlags(COLOR_THEME_PRIMARY2 | CENTERED);
} else {
txt->setBackgroundColor(COLOR_THEME_SECONDARY2);
txt->setTextFlags(CENTERED);
txt->setTextFlags(COLOR_THEME_PRIMARY1 | CENTERED);
}
txt->invalidate();
});
@@ -206,7 +206,7 @@ void RadioToolsPage::rebuild(FormWindow * window)
#if defined(INTERNAL_MODULE_MULTI)
{
auto txt = new StaticText(window, grid.getLabelSlot(), "multi",
BUTTON_BACKGROUND, CENTERED);
BUTTON_BACKGROUND, COLOR_THEME_PRIMARY1 | CENTERED);
auto b = new TextButton(
window, grid.getFieldSlot(1), STR_SPECTRUM_ANALYSER_INT,
[=]() -> uint8_t {
@@ -221,7 +221,7 @@ void RadioToolsPage::rebuild(FormWindow * window)
txt->setTextFlags(COLOR_THEME_PRIMARY2 | CENTERED);
} else {
txt->setBackgroundColor(COLOR_THEME_SECONDARY2);
txt->setTextFlags(CENTERED);
txt->setTextFlags(COLOR_THEME_PRIMARY1 | CENTERED);
}
txt->invalidate();
});
+3 -3
View File
@@ -43,7 +43,7 @@ void RadioTrainerPage::build(FormWindow * window)
for (uint8_t i=0; i<NUM_STICKS; i++) {
uint8_t chan = channelOrder(i+1);
TrainerMix * td = &g_eeGeneral.trainer.mix[chan-1];
new StaticText(window, grid.getLabelSlot(), TEXT_AT_INDEX(STR_VSRCRAW, (i + 1)));
new StaticText(window, grid.getLabelSlot(), TEXT_AT_INDEX(STR_VSRCRAW, (i + 1)), 0, COLOR_THEME_PRIMARY1);
new Choice(window, grid.getFieldSlot(3,0), STR_TRNMODE, 0, 2, GET_SET_DEFAULT(td->mode));
auto weight = new NumberEdit(window, grid.getFieldSlot(3, 1), -125, 125, GET_SET_DEFAULT(td->studWeight));
weight->setSuffix("%");
@@ -53,7 +53,7 @@ void RadioTrainerPage::build(FormWindow * window)
grid.nextLine();
// Trainer multiplier
new StaticText(window, grid.getLabelSlot(), STR_MULTIPLIER);
new StaticText(window, grid.getLabelSlot(), STR_MULTIPLIER, 0, COLOR_THEME_PRIMARY1);
auto multiplier = new NumberEdit(window, grid.getFieldSlot(3, 0), -10, 40, GET_SET_DEFAULT(g_eeGeneral.PPM_Multiplier));
multiplier->setDisplayHandler([](BitmapBuffer * dc, LcdFlags flags, int32_t value) {
dc->drawNumber(FIELD_PADDING_LEFT, FIELD_PADDING_TOP, value+10, flags | PREC1, 0);
@@ -62,7 +62,7 @@ void RadioTrainerPage::build(FormWindow * window)
grid.nextLine();
// Trainer calibration
new StaticText(window, grid.getLabelSlot(), STR_CAL);
new StaticText(window, grid.getLabelSlot(), STR_CAL, 0, COLOR_THEME_PRIMARY1);
for (int i = 0; i < NUM_STICKS; i++) {
#if defined (PPM_UNIT_PERCENT_PREC1)
auto calib = new NumberEdit(window, grid.getFieldSlot(4, i), 0 , 0, [=]() { return (ppmInput[i]-g_eeGeneral.trainer.calib[i]) * 2; }, nullptr, 0, LEFT | PREC1);
+27 -27
View File
@@ -91,36 +91,36 @@ class versionDialog: public Dialog
// Module
if (module == INTERNAL_MODULE)
new StaticText(form, grid->getLineSlot(), STR_INTERNAL_MODULE);
new StaticText(form, grid->getLineSlot(), STR_INTERNAL_MODULE, 0, COLOR_THEME_PRIMARY1);
else
new StaticText(form, grid->getLineSlot(), STR_EXTERNAL_MODULE);
new StaticText(form, grid->getLineSlot(), STR_EXTERNAL_MODULE, 0, COLOR_THEME_PRIMARY1);
grid->nextLine();
new StaticText(form, grid->getLabelSlot(true), STR_MODULE);
new StaticText(form, grid->getLabelSlot(true), STR_MODULE, 0, COLOR_THEME_PRIMARY1);
if (g_model.moduleData[module].type == MODULE_TYPE_NONE) {
new StaticText(form, grid->getFieldSlot(1, 0), STR_OFF);
new StaticText(form, grid->getFieldSlot(1, 0), STR_OFF, 0, COLOR_THEME_PRIMARY1);
}
#if defined(HARDWARE_EXTERNAL_ACCESS_MOD)
else if (isModuleMultimodule(module)) {
char statusText[64];
new StaticText(form, grid->getFieldSlot(2, 0), "Multimodule");
new StaticText(form, grid->getFieldSlot(2, 0), "Multimodule", 0, COLOR_THEME_PRIMARY1);
getMultiModuleStatus(module).getStatusString(statusText);
new StaticText(form, grid->getFieldSlot(2, 1), statusText);
new StaticText(form, grid->getFieldSlot(2, 1), statusText, 0, COLOR_THEME_PRIMARY1);
}
#endif
else if (!isModulePXX2(module)) {
new StaticText(form, grid->getFieldSlot(1, 0), STR_NO_INFORMATION);
new StaticText(form, grid->getFieldSlot(1, 0), STR_NO_INFORMATION, 0, COLOR_THEME_PRIMARY1);
}
else {
// PXX2 Module
new StaticText(form, grid->getFieldSlot(4, 0), getPXX2ModuleName(reusableBuffer.hardwareAndSettings.modules[module].information.modelID));
new StaticText(form, grid->getFieldSlot(4, 0), getPXX2ModuleName(reusableBuffer.hardwareAndSettings.modules[module].information.modelID), 0, COLOR_THEME_PRIMARY1);
if (reusableBuffer.hardwareAndSettings.modules[module].information.modelID) {
new StaticText(form, grid->getFieldSlot(4, 1), getVersion(tmp, reusableBuffer.hardwareAndSettings.modules[module].information.hwVersion));
new StaticText(form, grid->getFieldSlot(4, 2), getVersion(tmp, reusableBuffer.hardwareAndSettings.modules[module].information.swVersion));
new StaticText(form, grid->getFieldSlot(4, 1), getVersion(tmp, reusableBuffer.hardwareAndSettings.modules[module].information.hwVersion), 0, COLOR_THEME_PRIMARY1);
new StaticText(form, grid->getFieldSlot(4, 2), getVersion(tmp, reusableBuffer.hardwareAndSettings.modules[module].information.swVersion), 0, COLOR_THEME_PRIMARY1);
static const char * variants[] = {"FCC", "EU", "FLEX"};
uint8_t variant = reusableBuffer.hardwareAndSettings.modules[module].information.variant - 1;
if (variant < DIM(variants)) {
new StaticText(form, grid->getFieldSlot(4, 3), variants[variant]);
new StaticText(form, grid->getFieldSlot(4, 3), variants[variant], 0, COLOR_THEME_PRIMARY1);
}
}
grid->nextLine();
@@ -129,13 +129,13 @@ class versionDialog: public Dialog
for (uint8_t receiver=0; receiver<PXX2_MAX_RECEIVERS_PER_MODULE; receiver++) {
if (reusableBuffer.hardwareAndSettings.modules[module].receivers[receiver].information.modelID) {
// Receiver model
new StaticText(form, grid->getLabelSlot(true), STR_RECEIVER);
new StaticText(form, grid->getLabelSlot(true), STR_RECEIVER, 0, COLOR_THEME_PRIMARY1);
uint8_t modelId = reusableBuffer.hardwareAndSettings.modules[module].receivers[receiver].information.modelID;
new StaticText(form, grid->getFieldSlot(4, 0), getPXX2ReceiverName(modelId));
new StaticText(form, grid->getFieldSlot(4, 0), getPXX2ReceiverName(modelId), 0, COLOR_THEME_PRIMARY1);
// Receiver version
new StaticText(form, grid->getFieldSlot(4, 1), getVersion(tmp, reusableBuffer.hardwareAndSettings.modules[module].receivers[receiver].information.hwVersion));
new StaticText(form, grid->getFieldSlot(4, 2), getVersion(tmp, reusableBuffer.hardwareAndSettings.modules[module].receivers[receiver].information.swVersion));
new StaticText(form, grid->getFieldSlot(4, 1), getVersion(tmp, reusableBuffer.hardwareAndSettings.modules[module].receivers[receiver].information.hwVersion), 0, COLOR_THEME_PRIMARY1);
new StaticText(form, grid->getFieldSlot(4, 2), getVersion(tmp, reusableBuffer.hardwareAndSettings.modules[module].receivers[receiver].information.swVersion), 0, COLOR_THEME_PRIMARY1);
grid->nextLine();
}
}
@@ -168,7 +168,7 @@ class versionDialog: public Dialog
class OptionsText: public StaticText {
public:
OptionsText(Window * parent, const rect_t &rect) :
StaticText(parent, rect)
StaticText(parent, rect, "", 0, COLOR_THEME_PRIMARY1)
{
coord_t optionWidth = 0;
for (uint8_t i = 0; options[i]; i++) {
@@ -189,13 +189,13 @@ class OptionsText: public StaticText {
const char * option = options[i];
coord_t optionWidth = getTextWidth(option);
if (x + 5 + optionWidth > width()) {
dc->drawText(x, y, ",");
dc->drawText(x, y, ",", COLOR_THEME_PRIMARY1);
x = 0;
y += FH;
}
if (i > 0 && x != 0)
x = dc->drawText(x, y, ", ");
x = dc->drawText(x, y, option);
x = dc->drawText(x, y, ", ", COLOR_THEME_PRIMARY1);
x = dc->drawText(x, y, option, COLOR_THEME_PRIMARY1);
}
}
};
@@ -212,34 +212,34 @@ void RadioVersionPage::build(FormWindow * window)
grid.spacer(PAGE_PADDING);
// Radio type
new StaticText(window, grid.getLineSlot(), fw_stamp);
new StaticText(window, grid.getLineSlot(), fw_stamp, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
#if LCD_W > LCD_H
new StaticText(window, grid.getLineSlot(), vers_stamp);
new StaticText(window, grid.getLineSlot(), vers_stamp, 0, COLOR_THEME_PRIMARY1);
#else
memcpy(reusableBuffer.version.id, vers_stamp, strcspn(vers_stamp, " "));
new StaticText(window, grid.getFieldSlot(), reusableBuffer.version.id);
new StaticText(window, grid.getFieldSlot(), reusableBuffer.version.id, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
strAppend(reusableBuffer.version.id, strpbrk(vers_stamp, " "));
new StaticText(window, grid.getFieldSlot(), reusableBuffer.version.id);
new StaticText(window, grid.getFieldSlot(), reusableBuffer.version.id, 0, COLOR_THEME_PRIMARY1);
#endif
grid.nextLine();
// Firmware date
new StaticText(window, grid.getLineSlot(), date_stamp);
new StaticText(window, grid.getLineSlot(), date_stamp, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
// Firmware time
new StaticText(window, grid.getLineSlot(), time_stamp);
new StaticText(window, grid.getLineSlot(), time_stamp, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
// EEprom version
new StaticText(window, grid.getLineSlot(), eeprom_stamp);
new StaticText(window, grid.getLineSlot(), eeprom_stamp, 0, COLOR_THEME_PRIMARY1);
grid.nextLine();
// Firmware options
new StaticText(window, grid.getLabelSlot(), "OPTS:");
new StaticText(window, grid.getLabelSlot(), "OPTS:", 0, COLOR_THEME_PRIMARY1);
auto options = new OptionsText(window, grid.getFieldSlot(1,0));
grid.nextLine(options->height() + 4);
@@ -330,6 +330,6 @@ void ViewMainDecoration::createFlightMode()
return g_model.flightModeData[mixerCurrentFlightMode].name;
};
flightMode = new DynamicText(this, r, getFM, CENTERED);
flightMode = new DynamicText(this, r, getFM, CENTERED | COLOR_THEME_SECONDARY1);
}