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

@@ -9,6 +9,7 @@
#include "NodeDB.h"
#include "PowerFSM.h"
#include "configuration.h"
#include "error.h"
#include "mesh-pb-constants.h"
#include <pb_decode.h>
#include <pb_encode.h>
@@ -327,4 +328,12 @@ NodeInfo *NodeDB::getOrCreateNode(NodeNum n)
}
return info;
}
}
/// Record an error that should be reported via analytics
void recordCriticalError(CriticalErrorCode code, uint32_t address)
{
myNodeInfo.error_code = code;
myNodeInfo.error_address = address;
myNodeInfo.error_count++;
}