dragino / TrackerD

For Dragino TrackerD, which support GPS+WiFi+BLE+TEMP+HUM+ motion
22 stars 12 forks source link

Update parsing of serial data (AT commands from user) #8

Closed llange closed 2 years ago

llange commented 2 years ago

Current parsing was expecting full strings to appear in the serial buffer at once ; while when connected to an USB-Serial adapter the entry is more character per character. This patch tries to fill the buffer was as many as characters as possible, and process the line once a CR (\n) has been received - while trying to handle buffer overflows.