added cutting front and back of command

main
Jonas Arnold 4 years ago
parent 465278bde9
commit c2c8f12a05
  1. 3
      ADIS_Sumo_Styger/Sumo/Remote.c

@ -85,7 +85,8 @@ static void RemoteTask(void *pv) {
McuShell_SendStr((uint8_t*)" okok.\r\n", McuShell_GetStdio()->stdOut);
if (McuUtility_strncmp(espMsg, espMsgPrefix, sizeof(espMsgPrefix)-1) == 0) { /* check prefix */
unsigned char recCmd[32] = {0};
memmove(recCmd,espMsg[11],writeIndex);
memmove(recCmd,espMsg+strlen(espMsgPrefix),REMOTE_RX_FROM_ESP_QUEUE_LENGTH-strlen(espMsgPrefix)-1);
McuUtility_strCutTail(recCmd, (uint8_t*)"!\0");
McuShell_SendStr(recCmd, McuShell_GetStdio()->stdOut);
}
}else if(writeIndex == McuShell_DEFAULT_SHELL_BUFFER_SIZE && saveChar == 1){

Loading…
Cancel
Save