Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions C_ESR_METER.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1185,8 +1185,8 @@ void loop() {
// Clear "button release" message
lcd.clear();

// Force max unsigned long to enable manual power-off
AutoOffTimer = -1;
// Set max value to enable manual power-off
AutoOffTimer = UINT32_MAX;

} else { // Sort press to clear warning

Expand All @@ -1201,10 +1201,7 @@ void loop() {
}

// Check for "lock" status
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsign-compare"
if (AutoOffTimer == -1){
#pragma GCC diagnostic pop
if (AutoOffTimer == UINT32_MAX){
// Re-display "lock char" to upper right corner
lcd.setCursor(15, 0);
lcd.write(LOCK);
Expand Down Expand Up @@ -1250,8 +1247,8 @@ void loop() {
// Set "Power On", keeping to HIGH the POWER_OFF output (USB DEBUG) forces battery power if present
Set_Power_On;

// Force max unsigned long to enable manual power-off
AutoOffTimer = -1;
// Set max value to enable manual power-off
AutoOffTimer = UINT32_MAX;

// Display "lock char" to upper right corner
lcd.setCursor(15, 0);
Expand Down