mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-04-09 07:09:20 +00:00
Compare commits
2 Commits
feat/confi
...
fix/vcc_ch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b996dceca4 | ||
|
|
0e7cdb3df6 |
@@ -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 {
|
||||
|
||||
@@ -482,6 +482,7 @@ void setup() {
|
||||
debugW_P(PSTR("Voltage is outside optimal range (%.2fV)"), allowedDrift);
|
||||
if(gpioConfig.apPin != 0xFF && digitalRead(gpioConfig.apPin) == LOW) {
|
||||
debugW_P(PSTR("AP button is pressed, skipping voltage wait"));
|
||||
break;
|
||||
} else if(bootCycles < MAX_BOOT_CYCLES) {
|
||||
int secs = MAX_BOOT_CYCLES - bootCycles;
|
||||
if(deepSleep) {
|
||||
|
||||
Reference in New Issue
Block a user