mirror of
https://github.com/meshtastic/firmware.git
synced 2025-02-02 02:39:57 +00:00
fixed int float casting & made fillRect 2px smaller
This commit is contained in:
parent
a6c6b45576
commit
ae4ab48ddc
@ -740,9 +740,9 @@ void Screen::adjustBrightness(){
|
||||
} else {
|
||||
brightness++;
|
||||
}
|
||||
int width = (brightness / 254) * SCREEN_WIDTH;
|
||||
int width = brightness / (254.00 / SCREEN_WIDTH);
|
||||
dispdev.drawRect( 0, 30, SCREEN_WIDTH, 4);
|
||||
dispdev.fillRect(0, 30, width, 4);
|
||||
dispdev.fillRect(0, 31, width, 2);
|
||||
dispdev.display();
|
||||
dispdev.setBrightness(brightness);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user