| | |
| | | }*/ |
| | | |
| | | if (RxBufLen > 0) { |
| | | const uint8_t *ptr = parseGPS(RxBuf, RxBuf + RxBufLen); |
| | | if(ptr != RxBuf) { |
| | | memcpy(RxBuf, ptr, RxBufLen - (ptr - RxBuf)); |
| | | RxBufLen -= ptr - RxBuf; |
| | | } else if(RxBufLen == PARSE_BUFF_SIZE) { //填满了,且没有一个\r,都抛弃 |
| | | DEBUG("Parse GPS error"); |
| | | RxBufLen = 0; |
| | | } |
| | | // const uint8_t *ptr = parseGPS(RxBuf, RxBuf + RxBufLen); |
| | | // if(ptr != RxBuf) { |
| | | // memcpy(RxBuf, ptr, RxBufLen - (ptr - RxBuf)); |
| | | // RxBufLen -= ptr - RxBuf; |
| | | // } else if(RxBufLen == PARSE_BUFF_SIZE) { //填满了,且没有一个\r,都抛弃 |
| | | // DEBUG("Parse GPS error"); |
| | | // RxBufLen = 0; |
| | | // } |
| | | |
| | | |
| | | // RxBufLen = 0; //PC模拟用时 |
| | | RxBufLen = 0; //PC模拟用时 |
| | | } |
| | | } |
| | | if (res == 0) { |