Merge pull request #51 from foodbandlt/bugfix

Fix clearing stored config on restore
This commit is contained in:
Alan Weinstock 2019-10-28 08:29:43 -07:00 committed by GitHub
commit db1215db93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -69,7 +69,7 @@ void restoreConfig() {
} }
long longTemp; long longTemp;
EEPROM.get(VM_CONST_DEFAULT, longTemp); EEPROM.get(VM_CONST_ADDRESS, longTemp);
if (longTemp < 1000000L || longTemp > 1200000L) { if (longTemp < 1000000L || longTemp > 1200000L) {
resetEEPROM(); resetEEPROM();
} else { } else {

View file

@ -71,7 +71,7 @@ update the voltMeterConstant variable in pP_config.h with the correct value
void readVin() { void readVin() {
VOld = Vin; VOld = Vin;
Vin = readVcc(), DEC; Vin = readVcc();
followerLong = followerThrs * 1023L; followerLong = followerThrs * 1023L;
compLong = compThrs * 1023L; compLong = compThrs * 1023L;
followerInt = (long long) followerLong / Vin; followerInt = (long long) followerLong / Vin;