mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 09:43:03 +00:00
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:
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user