1
0
forked from me/IronOS

change increment and values of brightness settings (#1083)

This commit is contained in:
discip
2021-09-27 03:35:50 +02:00
committed by GitHub
parent f9fa24687f
commit 45f5838067
2 changed files with 3 additions and 3 deletions

View File

@@ -82,7 +82,7 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp
{0, 0xFFFF, 0, 41431 /*EN*/}, // UILanguage
{0, 51, 1, 0}, // PDNegTimeout
{0, 2, 1, 0}, // OLEDInversion
{7, 256, 0x08, 51}, // OLEDBrightness
{3, 256, 28, 59}, // OLEDBrightness
};
static_assert((sizeof(settingsConstants) / sizeof(SettingConstants)) == ((int)SettingsOptions::SettingsOptionsLength));
@@ -194,4 +194,4 @@ uint8_t lookupVoltageLevel() {
return 90; // 9V since iron does not function effectively below this
else
return (minVoltageOnCell * minVoltageCellCount) + (minVoltageCellCount * 2);
}
}

View File

@@ -743,7 +743,7 @@ static void settings_displayBrightnessLevel(void) {
OLED::drawArea(0, 0, 16, 16, brightnessIcon);
OLED::setCursor(5 * FONT_12_WIDTH - 2, 0);
// printShortDescription(SettingsItemIndex::Brightness, 7);
OLED::printNumber(getSettingValue(SettingsOptions::OLEDBrightness), 3, FontStyle::LARGE);
OLED::printNumber(((getSettingValue(SettingsOptions::OLEDBrightness) + 25) / 28), 3, FontStyle::LARGE);
// While not optimal to apply this here, it is _very_ convienient
OLED::setBrightness(getSettingValue(SettingsOptions::OLEDBrightness));
}