Added assertion, fixed formatting.

This commit is contained in:
James Goppert 2013-01-13 19:21:40 -05:00
parent 69f6fe51bc
commit e02791ee8e
1 changed files with 12 additions and 11 deletions

View File

@ -584,6 +584,7 @@ receive_thread(void *arg)
if (poll(fds, 1, timeout) > 0) {
/* non-blocking read */
size_t nread = read(uart_fd, buf, sizeof(buf));
ASSERT(nread > 0)
for (size_t i = 0; i < nread; i++) {
if (mavlink_parse_char(chan, buf[i], &msg, &status)) { //parse the char