mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-05-16 03:32:27 +00:00
Prevent boot loop in voltage check (#1171)
* Prevent boot loop if voltage is outside operating range * Fixed code error
This commit is contained in:
@@ -664,7 +664,8 @@ bool HwTools::isVoltageOptimal(float range) {
|
||||
lastVccRead = now;
|
||||
}
|
||||
if(vcc > 3.4 || vcc < 2.8) {
|
||||
maxVcc = 0; // Voltage is outside the operating range, we have to assume voltage is OK
|
||||
maxVcc = 0;
|
||||
return true; // Voltage is outside the operating range, we have to assume voltage is OK
|
||||
} else if(vcc > maxVcc) {
|
||||
maxVcc = vcc;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user