Optimizing drawGui() function
This commit is contained in:
parent
f62f3120fc
commit
9a9e405851
|
@ -109,7 +109,7 @@ void loop() {
|
|||
|
||||
if (!SerialBT.connected() && isConnected == true) {
|
||||
isConnected = false;
|
||||
drawGui(COLOR_MODE);
|
||||
drawGui();
|
||||
}
|
||||
|
||||
// read value from UART
|
||||
|
@ -286,7 +286,7 @@ void connectBluetooth() {
|
|||
SerialBT.connect(addr, channel, sec_mask, role);
|
||||
isConnected = true;
|
||||
wasConnected = true;
|
||||
drawGui(COLOR_MODE);
|
||||
drawGui();
|
||||
}
|
||||
} else {
|
||||
Serial.println("Didn't find any devices");
|
||||
|
@ -316,7 +316,7 @@ byte readOneByte() {
|
|||
// GUI functions //
|
||||
///////////////////
|
||||
|
||||
void drawGui(screenMode COLOR_MODE) {
|
||||
void drawGui() {
|
||||
M5.Lcd.clear();
|
||||
M5.Lcd.fillScreen((COLORS[COLOR_MODE] - 1) % 2);
|
||||
M5.Lcd.setTextColor(COLORS[COLOR_MODE]);
|
||||
|
@ -532,7 +532,7 @@ void screenModeHandler(Event &e) {
|
|||
}
|
||||
|
||||
buttonPressed = true;
|
||||
drawGui(COLOR_MODE);
|
||||
drawGui();
|
||||
}
|
||||
|
||||
void brightnessHandler(Event &e) {
|
||||
|
|
Loading…
Reference in a new issue