mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 00:37:37 +08:00
[ardrone] Fix small navdata bug and update changelog
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user