|
@@ -313,6 +313,10 @@ void USART2_IRQHandler(void)
|
|
|
memcpy(rx_buf_uart2, rx_buf_uart2_DMA, rx_len); // 拷贝实际接收数据
|
|
memcpy(rx_buf_uart2, rx_buf_uart2_DMA, rx_len); // 拷贝实际接收数据
|
|
|
deviceInfo.commandFromCloud = COMBINE_CMD_STEP(IDLE, STEP_VERIFY);
|
|
deviceInfo.commandFromCloud = COMBINE_CMD_STEP(IDLE, STEP_VERIFY);
|
|
|
}
|
|
}
|
|
|
|
|
+ else if (rx_buf_uart2_DMA[2] == 0x0A) { //意外情况,后台控制恢复初始状态
|
|
|
|
|
+ deviceInfo.isOnline = TRUE;
|
|
|
|
|
+ deviceInfo.commandFromCloud = COMBINE_CMD_STEP(IDLE, STEP_INIT);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
// ====== 判断 "SUCCESS" ======
|
|
// ====== 判断 "SUCCESS" ======
|
|
|
else if (rx_len >= 7 && strncmp((char *)rx_buf_uart2_DMA, "SUCCESS", 7) == 0)
|
|
else if (rx_len >= 7 && strncmp((char *)rx_buf_uart2_DMA, "SUCCESS", 7) == 0)
|