Skip to content

Commit

Permalink
[ardrone] Fix small navdata bug and update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
fvantienen committed Feb 25, 2015
1 parent e2b741b commit 9733727
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,8 @@ Paparazzi 5.5_devel

currently ongoing development, changes so far (no particular order, nor complete)

- arch/linux: change the sys timer to a multi threaded implementation
[#1117] (https://github.com/paparazzi/paparazzi/pull/1117)
- python: generate paparazzi math wrappers with SWIG
[#1066] (https://github.com/paparazzi/paparazzi/pull/1066)
- ground segment: use pkg-config for ivy-c if available
Expand Down
10 changes: 9 additions & 1 deletion sw/airborne/boards/ardrone/navdata.c
Expand Up @@ -487,7 +487,15 @@ void navdata_update()
// check if the start byte is correct
if (navdata.buffer[0] != NAVDATA_START_BYTE) {
uint8_t *pint = memchr(navdata.buffer, NAVDATA_START_BYTE, navdata.buffer_idx);
navdata.buffer_idx = (pint != NULL)? (pint - navdata.buffer):0;

// Check if we found the start byte in the read data
if(pint != NULL) {
memmove(navdata.buffer, pint, NAVDATA_PACKET_SIZE - (pint - navdata.buffer));
navdata.buffer_idx = pint - navdata.buffer;
}
else {
navdata.buffer_idx = 0;
}
return;
}

Expand Down

0 comments on commit 9733727

Please sign in to comment.