double clearing buffer

pull/113/head
alanbjohnston 5 years ago committed by GitHub
parent 63335e3e13
commit 7ef595e4bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1261,6 +1261,12 @@ void get_tlm_fox() {
while ((charss--> 0))
c = (char) serialGetchar(uart_fd); // clear buffer
charss = (char) serialDataAvail(uart_fd);
if (charss != 0)
printf("Clearing buffer of %d chars \n", charss);
while ((charss--> 0))
c = (char) serialGetchar(uart_fd); // clear buffer
unsigned int waitTime;
int i = 0;
serialPutchar(uart_fd, '?');

Loading…
Cancel
Save

Powered by TurnKey Linux.