admin mode switch

This commit is contained in:
2021-02-13 18:44:00 +01:00
parent 13dd2b718f
commit 69128ab209
10 changed files with 58 additions and 31 deletions

View File

@ -27,6 +27,7 @@ static bool showConfigCmd(uint8_t argc, char **args) {
sendFormatString("NTP Server: %s\n\r", configBlock.ntpServer);
sendFormatString("deviceId: %s\n\r", configBlock.deviceId);
sendFormatString("sharedSecret: (will not be displayed)\n\r");
sendFormatString("Sink Server: %s\n\r", configBlock.sinkServer);
return retCode;
}

View File

@ -40,7 +40,11 @@ void my_setup_2() {
wizInit();
cmdHandlerInit();
if (HAL_GPIO_ReadPin(ADMIN_MODE_GPIO_Port, ADMIN_MODE_Pin)) {
show(LED_BLUE, BLINK);
coloredMsg(LED_RED, "STARTING ADMIN MODE");
cmdHandlerInit();
}
counterInit();

View File

@ -19,6 +19,7 @@ showElement_t showElement[] = {
{ .port = Debug_Signal_2_GPIO_Port, .pin = Debug_Signal_2_Pin, .currentState = OFF },
{ .port = LED_Red_GPIO_Port, .pin = LED_Red_Pin, .currentState = OFF },
{ .port = LED_Green_GPIO_Port, .pin = LED_Green_Pin, .currentState = OFF },
{ .port = LED_Blue_GPIO_Port, .pin = LED_Blue_Pin, .currentState = OFF },
{ .port = NULL, .pin = 0, .currentState = OFF }
};