firmware/src/error.h

34 lines
915 B
C
Raw Normal View History

#pragma once
#include <Arduino.h>
2020-12-26 05:36:21 +00:00
/** Error codes for critical errors
*
* The device might report these fault codes on the screen. If you encounter a fault code, please
* post on the meshtastic.discourse.group and we'll try to help.
*/
enum CriticalErrorCode {
NoError = 0,
2020-12-26 05:55:59 +00:00
/// A software bug was detected while trying to send lora packets
2020-12-26 05:36:21 +00:00
ErrTxWatchdog = 1,
2020-12-26 05:55:59 +00:00
/// A software bug was detected on entry to sleep
2020-12-26 05:36:21 +00:00
ErrSleepEnterWait = 2,
2020-12-26 05:55:59 +00:00
/// No Lora radio hardware could be found
2020-12-26 05:36:21 +00:00
ErrNoRadio = 3,
2020-12-26 05:55:59 +00:00
/// Not normally used
2020-12-26 05:36:21 +00:00
ErrUnspecified = 4,
2020-12-26 05:55:59 +00:00
/// We failed while configuring a UBlox GPS
2020-12-26 05:36:21 +00:00
ErrUBloxInitFailed = 5,
2020-12-26 05:55:59 +00:00
/// This board was expected to have a power management chip and it is missing or broken
2020-12-26 05:36:21 +00:00
ErrNoAXP192 = 6
};
/// Record an error that should be reported via analytics
void recordCriticalError(CriticalErrorCode code, uint32_t address = 0);