mirror of
https://github.com/airgradienthq/arduino.git
synced 2025-07-04 19:56:31 +02:00
Implement display / ledBar brightness
This commit is contained in:
@ -94,6 +94,8 @@ bool OledDisplay::begin(void) {
|
||||
return false;
|
||||
}
|
||||
|
||||
setBrightness(config.getDisplayBrightness());
|
||||
|
||||
isBegin = true;
|
||||
logInfo("begin");
|
||||
return true;
|
||||
@ -308,3 +310,7 @@ void OledDisplay::showWiFiQrCode(String content, String label) {
|
||||
DISP()->drawStr(x_start, 60, label.c_str());
|
||||
} while (DISP()->nextPage());
|
||||
}
|
||||
|
||||
void OledDisplay::setBrightness(int percent) {
|
||||
DISP()->setContrast((127 * percent) / 100);
|
||||
}
|
||||
|
Reference in New Issue
Block a user