mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-19 09:38:11 +00:00
Added a small delay that helped smooth the voltage on a HAN powered device. No more sudden reboots
This commit is contained in:
parent
4786735d4c
commit
bbe82f9cdc
@ -189,7 +189,7 @@ void loop() {
|
||||
}
|
||||
if (!config.getMqttHost().isEmpty()) {
|
||||
mqtt.loop();
|
||||
delay(10);
|
||||
delay(10); // Needed to preserve power. After adding this, the voltage is super smooth on a HAN powered device
|
||||
if(!mqtt.connected() || config.isMqttChanged()) {
|
||||
MQTT_connect();
|
||||
}
|
||||
@ -201,7 +201,7 @@ void loop() {
|
||||
dnsServer.processNextRequest();
|
||||
// Continously flash the LED when AP mode
|
||||
if (now / 50 % 64 == 0) led_on();
|
||||
else led_off();
|
||||
else led_off();
|
||||
|
||||
}
|
||||
readHanPort();
|
||||
@ -321,6 +321,7 @@ void readHanPort() {
|
||||
|
||||
mqtt.publish(config.getMqttPublishTopic(), msg.c_str());
|
||||
mqtt.loop();
|
||||
delay(10); // Needed to preserve power
|
||||
}
|
||||
ws.setJson(json);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user