changed Reset via Buttons during Startup
This commit is contained in:
		| @@ -236,8 +236,26 @@ void loop() | ||||
| #ifdef FEATURE_ENABLE_WIFI_CLIENT | ||||
| 	tmrWiFiMaintainConnection.update(); | ||||
| #endif | ||||
| 	if (globals.systemStatus == sysStat_Shutdown) | ||||
|  | ||||
| 	switch (globals.systemStatus) | ||||
| 	{ | ||||
| 	case sysStat_Error: | ||||
| 		/* code */ | ||||
| 		break; | ||||
| 	case sysStat_Normal: | ||||
| 		/* code */ | ||||
| 		break; | ||||
| 	case sysStat_Shutdown: | ||||
| 		SystemShutdown(); | ||||
| 		break; | ||||
| 	case sysStat_Startup: | ||||
| 		if (millis() > STARTUP_DELAY_MS) | ||||
| 			globals.systemStatus = sysStat_Normal; | ||||
| 		break; | ||||
|  | ||||
| 	default: | ||||
| 		break; | ||||
| 	} | ||||
|  | ||||
| 	yield(); | ||||
| } | ||||
| @@ -565,7 +583,7 @@ void ProcessKeyCombos(bool *btnState) | ||||
| 		else if (keyCount_Fac2 == 4 && keyCount_Fac3 == 0) | ||||
| 		{ | ||||
| 			Serial.printf("KeyCombo: Reset Timer\n"); | ||||
| 			if (millis() < RESETABLE_AFTER_STARTUP_MS) | ||||
| 			if (globals.systemStatus == sysStat_Startup) | ||||
| 			{ | ||||
| 				OverrideDisplay("RST ", 5000); | ||||
| 				PersistenceData.faction_1_timer = 0; | ||||
| @@ -577,7 +595,7 @@ void ProcessKeyCombos(bool *btnState) | ||||
| 			else | ||||
| 			{ | ||||
| 				OverrideDisplay("ERR ", 5000); | ||||
| 				Serial.printf("ERROR: only %d seconds after Startup!\n", RESETABLE_AFTER_STARTUP_MS / 1000); | ||||
| 				Serial.printf("ERROR: only %d seconds after Startup!\n", STARTUP_DELAY_MS / 1000); | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user