feat(bw128): add option to invert LCD/OLED display (#4933)

This commit is contained in:
philmoz
2024-06-06 07:52:45 +10:00
committed by GitHub
parent fb2188cacd
commit 65e05085a4
15 changed files with 275 additions and 191 deletions
+5 -1
View File
@@ -611,5 +611,9 @@ const char * restoreModel(uint8_t idx, char *model_name)
bool storageReadRadioSettings(bool checks)
{
if (!sdMounted()) sdInit();
return loadRadioSettingsYaml(checks) == nullptr;
bool rv = loadRadioSettingsYaml(checks) == nullptr;
#if LCD_W == 128
lcdSetInvert(g_eeGeneral.invertLCD);
#endif
return rv;
}
@@ -358,7 +358,8 @@ static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ),
YAML_UNSIGNED( "modelTelemetryDisabled", 1 ),
YAML_UNSIGNED( "disableTrainerPoweroffAlarm", 1 ),
YAML_PADDING( 5 ),
YAML_UNSIGNED( "invertLCD", 1 ),
YAML_PADDING( 4 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -358,7 +358,8 @@ static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ),
YAML_UNSIGNED( "modelTelemetryDisabled", 1 ),
YAML_UNSIGNED( "disableTrainerPoweroffAlarm", 1 ),
YAML_PADDING( 5 ),
YAML_UNSIGNED( "invertLCD", 1 ),
YAML_PADDING( 4 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -358,7 +358,8 @@ static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ),
YAML_UNSIGNED( "modelTelemetryDisabled", 1 ),
YAML_UNSIGNED( "disableTrainerPoweroffAlarm", 1 ),
YAML_PADDING( 5 ),
YAML_UNSIGNED( "invertLCD", 1 ),
YAML_PADDING( 4 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -361,7 +361,8 @@ static const struct YamlNode struct_RadioData[] = {
YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ),
YAML_UNSIGNED( "modelTelemetryDisabled", 1 ),
YAML_UNSIGNED( "disableTrainerPoweroffAlarm", 1 ),
YAML_PADDING( 5 ),
YAML_UNSIGNED( "invertLCD", 1 ),
YAML_PADDING( 4 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {