add support for reporting device errors up through the phone to analytics

related to https://github.com/meshtastic/Meshtastic-esp32/issues/53
This commit is contained in:
geeksville
2020-03-24 13:33:24 -07:00
parent 3f1161b68b
commit 34ead2d68e
6 changed files with 53 additions and 12 deletions

View File

@@ -1,4 +1,5 @@
#include "RH_RF95.h"
#include "error.h"
#include <RHMesh.h>
#include <SPI.h>
#include <assert.h>
@@ -149,6 +150,7 @@ void MeshRadio::loop()
if (lastTxStart != 0 && (now - lastTxStart) > TX_WATCHDOG_TIMEOUT && rf95.mode() == RHGenericDriver::RHModeTx) {
DEBUG_MSG("ERROR! Bug! Tx packet took too long to send, forcing radio into rx mode");
rf95.setModeRx();
recordCriticalError(ErrTxWatchdog);
lastTxStart = 0; // Stop checking for now, because we just warned the developer
}
}