Skip to content

Commit

Permalink
Beta v0.12.19 Fix debug info for Time to off TTGO T-Display #192
Browse files Browse the repository at this point in the history
  • Loading branch information
melkati committed Apr 1, 2024
1 parent ae5f808 commit 3835556
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion CO2_Gadget.ino
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ void adjustBrightnessLoop() {
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);
}
return;
}
Expand All @@ -477,7 +478,8 @@ void adjustBrightnessLoop() {
if (!workingOnExternalPower) {
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);
}
}
#endif
Expand Down
7 changes: 4 additions & 3 deletions CO2_Gadget_TFT.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,10 @@ void setElementLocations() {
void setDisplayBrightness(uint16_t newBrightness) {
#ifdef TTGO_TDISPLAY
if (actualDisplayBrightness != newBrightness) {
Serial.printf("\n-->[TFT ] DisplayBrightness value at %d\n", DisplayBrightness);
Serial.printf("-->[TFT ] actualDisplayBrightness value at %d\n", actualDisplayBrightness);
Serial.printf("-->[TFT ] New display brightness value at %d\n", newBrightness);
Serial.println("\n-->[TFT ] DisplayBrightness value at: " + String(DisplayBrightness));
Serial.println("-->[TFT ] actualDisplayBrightness value at: " + String(actualDisplayBrightness));
Serial.println("-->[TFT ] New display brightness value at: " + String(newBrightness));
delay(10);
analogWrite(TFT_BACKLIGHT, newBrightness);
actualDisplayBrightness = newBrightness;
}
Expand Down
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ build_flags =

-D MQTT_BROKER_SERVER="\"192.168.1.145"\"
-D CO2_GADGET_VERSION="\"0.12."\"
-D CO2_GADGET_REV="\"018"\"
-D CO2_GADGET_REV="\"019"\"
-D CORE_DEBUG_LEVEL=0
-DCACHE_DIR=".pio/build"
-DBUZZER_PIN=2 ; ESP32 pin GPIO13 connected to piezo buzzer
Expand Down

0 comments on commit 3835556

Please sign in to comment.