fixed Display of current SysStatus
This commit is contained in:
parent
97cdd7fad1
commit
6bc523b2a8
@ -11,6 +11,13 @@ typedef enum eSystem_Status
|
||||
sysStat_Shutdown
|
||||
} tSystem_Status;
|
||||
|
||||
const char sSystem_Status_txt[][9] = {
|
||||
"Startup",
|
||||
"Normal",
|
||||
"Error",
|
||||
"Shutdown"
|
||||
};
|
||||
|
||||
typedef enum eEERequest
|
||||
{
|
||||
EE_IDLE,
|
||||
@ -31,8 +38,6 @@ typedef struct Globals_s
|
||||
char DeviceName_ID[43];
|
||||
char FlashVersion[10];
|
||||
tSystem_Status systemStatus = sysStat_Startup;
|
||||
tSystem_Status resumeStatus = sysStat_Startup;
|
||||
char systemStatustxt[16] = "";
|
||||
eEERequest requestEEAction = EE_IDLE;
|
||||
uint16_t eePersistanceAdress;
|
||||
bool hasDTC;
|
||||
|
@ -204,8 +204,6 @@ void Debug_dumpConfig()
|
||||
void Debug_dumpGlobals()
|
||||
{
|
||||
Debug_pushMessage("systemStatus: %d\n", globals.systemStatus);
|
||||
Debug_pushMessage("resumeStatus: %d\n", globals.resumeStatus);
|
||||
Debug_pushMessage("systemStatustxt: %s\n", globals.systemStatustxt);
|
||||
Debug_pushMessage("battery_level: %d\n", globals.battery_level);
|
||||
Debug_pushMessage("loadvoltage_mV: %d\n", globals.loadvoltage_mV);
|
||||
Debug_pushMessage("requestEEAction: %d\n", globals.requestEEAction);
|
||||
|
@ -5,6 +5,5 @@ Globals_t globals;
|
||||
void initGlobals()
|
||||
{
|
||||
globals.systemStatus = sysStat_Startup;
|
||||
globals.resumeStatus = sysStat_Normal;
|
||||
globals.requestEEAction = EE_IDLE;
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ String processor(const String &var)
|
||||
if (var == "HOSTNAME")
|
||||
return String(globals.DeviceName);
|
||||
if (var == "SYSTEM_STATUS")
|
||||
return String(globals.systemStatustxt);
|
||||
return String(sSystem_Status_txt[globals.systemStatus]);
|
||||
if (var == "SW_VERSION")
|
||||
{
|
||||
char buffer[6];
|
||||
|
Loading…
x
Reference in New Issue
Block a user