mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-12 00:02:53 +00:00
parent
37aa6ae816
commit
9153a98694
@ -97,6 +97,11 @@ float AmsFirmwareUpdater::getProgress() {
|
||||
}
|
||||
|
||||
void AmsFirmwareUpdater::loop() {
|
||||
if(millis() < 30000) {
|
||||
// Wait 30 seconds before starting upgrade. This allows the device to deal with other tasks first
|
||||
// It will also allow BUS powered devices to reach a stable voltage so that hw->isVoltageOptimal will behave properly
|
||||
return;
|
||||
}
|
||||
if(strlen(updateStatus.toVersion) > 0 && updateStatus.errorCode == AMS_UPDATE_ERR_OK) {
|
||||
if(!hw->isVoltageOptimal(0.1)) {
|
||||
writeUpdateStatus();
|
||||
|
||||
@ -67,7 +67,7 @@ private:
|
||||
bool ledInvert, rgbInvert;
|
||||
uint8_t vccPin, vccGnd_r, vccVcc_r;
|
||||
float vccOffset, vccMultiplier;
|
||||
float maxVcc = 3.2; // Best to have this close to max as a start, in case Pow-U reboots and starts off with a low voltage, we dont want that to be perceived as max
|
||||
float maxVcc = 3.25; // Best to have this close to max as a start, in case Pow-U reboots and starts off with a low voltage, we dont want that to be perceived as max
|
||||
|
||||
uint16_t analogRange = 1024;
|
||||
AdcConfig voltAdc, tempAdc;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user