[ardrone] Fix small navdata bug and update changelog

This commit is contained in:
Freek van Tienen
2015-02-25 16:57:36 +01:00
parent e2b741be03
commit 973372733d
2 changed files with 11 additions and 1 deletions
+2
View File
@@ -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
+9 -1
View File
@@ -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;
}