diff --git a/CO2_Gadget.ino b/CO2_Gadget.ino index 5956a34e..645d6ad4 100644 --- a/CO2_Gadget.ino +++ b/CO2_Gadget.ino @@ -295,8 +295,8 @@ void wakeUpDisplay() { if (actualDisplayBrightness == 0) { #if defined(SUPPORT_OLED) || defined(SUPPORT_TFT) setDisplayBrightness(DisplayBrightness); - publishMQTTLogData("Display woken up. Setting display brightness to " + String(DisplayBrightness)); - Serial.println("-->[MAIN] Display woken up. Setting display brightness to " + String(DisplayBrightness)); + // publishMQTTLogData("Display woken up. Setting display brightness to " + String(DisplayBrightness)); + // Serial.println("-->[MAIN] Display woken up. Setting display brightness to " + String(DisplayBrightness)); #endif lastTimeButtonPressed = millis(); } @@ -460,9 +460,9 @@ void adjustBrightnessLoop() { if ((workingOnExternalPower) && (!displayOffOnExternalPower)) { if (actualDisplayBrightness == 0) { setDisplayBrightness(DisplayBrightness); // Exception: When USB connected (just connected) & TFT is OFF -> Turn Display ON - publishMQTTLogData("Turning on display on external power. Actual brightness: " + String(actualDisplayBrightness)); - Serial.println("-->[MAIN] Turning on display on external power. Actual brightness: " + String(actualDisplayBrightness)); - delay(10); + // publishMQTTLogData("Turning on display on external power. Actual brightness: " + String(actualDisplayBrightness)); + // Serial.println("-->[MAIN] Turning on display on external power. Actual brightness: " + String(actualDisplayBrightness)); + // delay(10); } return; } @@ -473,12 +473,12 @@ void adjustBrightnessLoop() { if ((workingOnExternalPower) && (displayOffOnExternalPower)) { Serial.println("-->[MAIN] Turning off display on external power to save power. Actual brightness: " + String(actualDisplayBrightness)); turnOffDisplay(); - publishMQTTLogData("[MAIN] Turning off display on external power to save power. Actual brightness: " + String(actualDisplayBrightness)); + // publishMQTTLogData("[MAIN] Turning off display on external power to save power. Actual brightness: " + String(actualDisplayBrightness)); } if (!workingOnExternalPower) { - Serial.println("-->[MAIN] Turning off display on battery to save power. Actual brightness: " + String(actualDisplayBrightness)); + // Serial.println("-->[MAIN] Turning off display on battery to save power. Actual brightness: " + String(actualDisplayBrightness)); turnOffDisplay(); - publishMQTTLogData("[MAIN] Turning off display on battery to save power. Actual brightness: " + String(actualDisplayBrightness)); + // publishMQTTLogData("[MAIN] Turning off display on battery to save power. Actual brightness: " + String(actualDisplayBrightness)); delay(10); } } diff --git a/CO2_Gadget_TFT.h b/CO2_Gadget_TFT.h index b30d584f..039bd32e 100644 --- a/CO2_Gadget_TFT.h +++ b/CO2_Gadget_TFT.h @@ -191,10 +191,10 @@ void setElementLocations() { void setDisplayBrightness(uint16_t newBrightness) { #ifdef TTGO_TDISPLAY if (actualDisplayBrightness != newBrightness) { - Serial.println("\n-->[TFT ] DisplayBrightness (user setting) value at: " + String(DisplayBrightness)); - Serial.println("-->[TFT ] actualDisplayBrightness value at: " + String(actualDisplayBrightness)); - Serial.println("-->[TFT ] New display brightness value at: " + String(newBrightness)); - delay(20); + // Serial.println("\n-->[TFT ] DisplayBrightness (user setting) value at: " + String(DisplayBrightness)); + // Serial.println("-->[TFT ] actualDisplayBrightness value at: " + String(actualDisplayBrightness)); + // Serial.println("-->[TFT ] New display brightness value at: " + String(newBrightness)); + // delay(20); analogWrite(TFT_BACKLIGHT, newBrightness); actualDisplayBrightness = newBrightness; }