1
0
forked from me/IronOS

Contrast -> Brightness

As it makes a little more sense in a 1 bit display
This commit is contained in:
Ben V. Brown
2021-09-12 19:14:45 +10:00
parent 87a96bcff7
commit 4b2f350b35
37 changed files with 76 additions and 69 deletions

View File

@@ -76,7 +76,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}, // OLEDContrast
{7, 256, 0x08, 51}, // OLEDBrightness
};
static_assert((sizeof(settingsConstants) / sizeof(SettingConstants)) == ((int)SettingsOptions::SettingsOptionsLength));
@@ -144,7 +144,7 @@ bool nextSettingValue(const enum SettingsOptions option) {
} else {
systemSettings.settingsValues[(int)option] += constants.increment;
}
return systemSettings.settingsValues[(int)option] == constants.max - constants.increment;
return (constants.max - systemSettings.settingsValues[(int)option]) < constants.increment;
}
bool prevSettingValue(const enum SettingsOptions option) {