| | |
| | | //#include "UsartII.h" |
| | | //#include "main.h" |
| | | #include "board.h" |
| | | #include "DBG.h" |
| | | //#include "Spi.h" |
| | | //#include "radio.h" |
| | | |
| | |
| | | char GGA_Format_message[200]; |
| | | extern uint8_t bat_percent,userkey_state,gps_first_flag; |
| | | extern GPSState GPS_state; |
| | | uint8_t shell_receive_state; |
| | | void UsartParseDataHandler(uint8_t data) |
| | | { |
| | | if(state5V_prase_flag&&!g_com_map[MODBUS_MODE]) |
| | |
| | | } else if ((usart_receive_state == UsartReceiveWaitMsgType) && (data == 0x3)) { |
| | | usart_receive_state = UsartReceiveWaitLength; |
| | | pack_msgtype = data; |
| | | }else if ((shell_receive_state == 0) && (data == 0x03)) { |
| | | shell_receive_state = 1; |
| | | uart_send(UART_ID1, data,1, NULL); |
| | | } else if ((shell_receive_state == 1) && (data == 0x03)) { |
| | | shell_receive_state = 2; |
| | | uart_send(UART_ID1, data,1, NULL); |
| | | } else if ((shell_receive_state == 2) && (data == 0x03)) { |
| | | DBG_SetMode(DBG_MODE_SHELL); |
| | | uart_send(UART_ID1, data,1, NULL); |
| | | shell_receive_state=0; |
| | | } |
| | | |
| | | else { |
| | | usart_receive_state = UsartReceiveWaitHead0; |
| | | pack_index = 0; |