mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-26 18:09:04 +00:00
Merge pull request #228 from mrvdb/sh1106-support
Take configured SCREEN_WIDTH into account for brightness bar
This commit is contained in:
commit
aeb906414f
@ -740,8 +740,8 @@ void Screen::adjustBrightness(){
|
||||
} else {
|
||||
brightness++;
|
||||
}
|
||||
int width = brightness / 1.984375;
|
||||
dispdev.drawRect( 0, 30, 128, 4);
|
||||
int width = (brightness / 254) * SCREEN_WIDTH;
|
||||
dispdev.drawRect( 0, 30, SCREEN_WIDTH, 4);
|
||||
dispdev.fillRect(0, 30, width, 4);
|
||||
dispdev.display();
|
||||
dispdev.setBrightness(brightness);
|
||||
|
Loading…
Reference in New Issue
Block a user