Support IPS screen & brightness set for IPS screen (#2629)

* _

* format

* format

* format
This commit is contained in:
sommermorgentraum 2025-04-17 13:40:28 +08:00 committed by GitHub
parent 806219f46e
commit 6b6a00d511
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 39 additions and 42 deletions

View file

@ -231,10 +231,10 @@ class IO {
return switches_raw;
}
bool inverted_enabled = false;
bool lcd_normally_black = false;
bool dark_cover_enabled = false;
uint8_t brightness = 0;
bool get_is_inverted();
bool get_is_normally_black();
bool get_dark_cover();
uint8_t get_brightness();
void update_cached_values();
@ -419,7 +419,7 @@ class IO {
const auto value_low = data_read();
uint32_t original_value = (value_high << 8) | value_low;
if (inverted_enabled) return original_value;
if (lcd_normally_black) return original_value;
if (dark_cover_enabled) {
// this is read data, so if the fake brightness is enabled AKA get_dark_cover() == true,