sforkowany z mirror/meshtastic-firmware
Merge pull request #228 from mrvdb/sh1106-support
Take configured SCREEN_WIDTH into account for brightness bar1.2-legacy
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);
|
||||
|
|
Ładowanie…
Reference in New Issue