|
|
|
|
@ -406,7 +406,12 @@ static void StateMachine(bool buttonPress) { |
|
|
|
|
presentCnt = MAZE_GetPresentCount(); |
|
|
|
|
//publish
|
|
|
|
|
BUZ_Beep(1000, 1000); |
|
|
|
|
McuShell_SendStr((unsigned char*)"mqtt publish \"/mobile/status/present/\" \"true\"\r\n", McuESP32_GetTxToESPStdio()->stdOut); |
|
|
|
|
unsigned char payload[50] = "mqtt publish \"/mobile/status/present/\" \""; |
|
|
|
|
unsigned char number[4] = ""; |
|
|
|
|
McuUtility_Num8uToStr(number, sizeof(number), presentCnt); |
|
|
|
|
McuUtility_strcat(payload, sizeof(payload), number); |
|
|
|
|
McuUtility_strcat(payload, sizeof(payload), (unsigned char*)"\"\r\n"); |
|
|
|
|
McuShell_SendStr(payload, McuESP32_GetTxToESPStdio()->stdOut); |
|
|
|
|
// McuShell_SendStr((unsigned char*)"\r\n", McuESP32_GetTxToESPStdio()->stdOut);
|
|
|
|
|
} |
|
|
|
|
vTaskDelay(pdMS_TO_TICKS(10)); |
|
|
|
|
@ -512,8 +517,7 @@ static uint8_t AutoCalibrateReflectance(void) { |
|
|
|
|
|
|
|
|
|
static uint8_t SetManualMode(){ |
|
|
|
|
appState = APP_STATE_MANUAL_MOVE; |
|
|
|
|
McuShell_SendStr((unsigned char*)"mqtt publish \"/mobile/status/mode/\" \"MANUAL\"", McuESP32_GetTxToESPStdio()->stdOut); |
|
|
|
|
McuShell_SendStr((unsigned char*)"\r\n", McuESP32_GetTxToESPStdio()->stdOut); |
|
|
|
|
McuShell_SendStr((unsigned char*)"mqtt publish \"/mobile/status/mode/\" \"MANUAL\"\r\n", McuESP32_GetTxToESPStdio()->stdOut); |
|
|
|
|
return ERR_OK; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|