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