refactoring
This commit is contained in:
parent
2741563f6f
commit
7272e8f065
|
@ -36,7 +36,8 @@ EXTERN_ENGINE;
|
||||||
extern int warningEnabled;
|
extern int warningEnabled;
|
||||||
extern bool main_loop_started;
|
extern bool main_loop_started;
|
||||||
|
|
||||||
fatal_msg_t errorMessageBuffer;
|
// todo: rename to fatalErrorMessage?
|
||||||
|
static fatal_msg_t errorMessageBuffer;
|
||||||
bool hasFirmwareErrorFlag = false;
|
bool hasFirmwareErrorFlag = false;
|
||||||
|
|
||||||
const char *dbg_panic_file;
|
const char *dbg_panic_file;
|
||||||
|
|
|
@ -25,23 +25,26 @@ void addWarningCode(obd_code_e code);
|
||||||
* Something is wrong, but we can live with it: some minor sensor is disconnected
|
* Something is wrong, but we can live with it: some minor sensor is disconnected
|
||||||
* or something like that
|
* or something like that
|
||||||
*
|
*
|
||||||
|
* see also firmwareError()
|
||||||
*/
|
*/
|
||||||
bool warning(obd_code_e code, const char *fmt, ...);
|
bool warning(obd_code_e code, const char *fmt, ...);
|
||||||
bool isWarningNow(efitimesec_t now, bool forIndicator);
|
|
||||||
|
|
||||||
typedef uint8_t fatal_msg_t[200];
|
typedef uint8_t fatal_msg_t[200];
|
||||||
/**
|
/**
|
||||||
* Something really bad had happened - firmware cannot function
|
* Something really bad had happened - firmware cannot function, we cannot run the engine
|
||||||
*
|
*
|
||||||
* todo: better method name?
|
* see also warning()
|
||||||
*/
|
*/
|
||||||
void firmwareError(obd_code_e code, const char *fmt, ...);
|
void firmwareError(obd_code_e code, const char *fmt, ...);
|
||||||
|
|
||||||
#define hasFirmwareError() hasFirmwareErrorFlag
|
#define hasFirmwareError() hasFirmwareErrorFlag
|
||||||
|
|
||||||
|
bool isWarningNow(efitimesec_t now, bool forIndicator);
|
||||||
|
// todo: rename to getFatalErrorMessage
|
||||||
char *getFirmwareError(void);
|
char *getFirmwareError(void);
|
||||||
|
|
||||||
void initErrorHandling(void);
|
void initErrorHandling(void);
|
||||||
|
// todo: rename to getWarningMessage?
|
||||||
char *getWarning(void);
|
char *getWarning(void);
|
||||||
|
|
||||||
// todo: better place for this shared declaration?
|
// todo: better place for this shared declaration?
|
||||||
|
|
Loading…
Reference in New Issue