added support for min/max contrast to eeprom interface and use it (#5473)
Added support for min/max contrast to eeprom interface and use it. Fixes #5468
This commit is contained in:
committed by
Bertrand Songis
parent
81dbebb663
commit
934578118b
@@ -212,6 +212,16 @@ void GeneralSettings::convert(Board::Type before, Board::Type after)
|
||||
memcpy(switchName[5], switchName[7], sizeof(switchName[5]));
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_TARANIS(after)) {
|
||||
unsigned int min_contrast = getCurrentFirmware()->getCapability(MinContrast);
|
||||
unsigned int max_contrast = getCurrentFirmware()->getCapability(MaxContrast);
|
||||
|
||||
if (contrast < min_contrast)
|
||||
contrast = min_contrast;
|
||||
else if (contrast > max_contrast)
|
||||
contrast = max_contrast;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user