1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

Fixed a bug when scanning for start of packet.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2861 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
pip 2011-02-23 10:11:26 +00:00 committed by pip
parent c819ac938e
commit bee704176b

View File

@ -131,7 +131,7 @@ int GTOP_BIN_update_position(uint8_t b, volatile uint32_t *chksum_errors, volati
while (gps_rx_buffer_wr > 0)
{
t_gps_bin_packet *rx_packet = (t_gps_bin_packet *)gps_rx_buffer;
t_gps_bin_packet *rx_packet = (t_gps_bin_packet *)(gps_rx_buffer + i);
// scan for the start of a binary packet (the header bytes)
while (gps_rx_buffer_wr - i >= sizeof(rx_packet->header))