Browse Source

more ota debugging

main
Hendrik Langer 7 years ago
parent
commit
94b94d8a91
  1. 9
      src/main.cpp

9
src/main.cpp

@ -237,6 +237,9 @@ void ICACHE_FLASH_ATTR sendValues() {
rssiObject["value"] = sd.rssi; rssiObject["value"] = sd.rssi;
root["rssi"] = sd.rssi; root["rssi"] = sd.rssi;
root["millis"] = millis();
root["heap"] = ESP.getFreeHeap();
char buffer[500]; char buffer[500];
array.printTo(buffer, sizeof(buffer)); array.printTo(buffer, sizeof(buffer));
@ -361,6 +364,10 @@ void ICACHE_FLASH_ATTR sendValues() {
mqttclient.loop(); mqttclient.loop();
mqttclient.disconnect(); mqttclient.disconnect();
if (sd.rssi == 0) { // re-read rssi if zero
sd.rssi = WiFi.RSSI();
}
if (loop_count == 1) { if (loop_count == 1) {
XD0OTA ota; XD0OTA ota;
ota.update(); ota.update();
@ -407,7 +414,7 @@ void setup() {
geigeraverage.clear(); geigeraverage.clear();
previousMillis = millis(); previousMillis = rtcMillis();
DEBUG_MSG("ready.\n"); //Serial.flush(); DEBUG_MSG("ready.\n"); //Serial.flush();
} }

Loading…
Cancel
Save