From bee704176b8c6d8b139f7b0b2178f507e030cd62 Mon Sep 17 00:00:00 2001 From: pip Date: Wed, 23 Feb 2011 10:11:26 +0000 Subject: [PATCH] Fixed a bug when scanning for start of packet. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2861 ebee16cc-31ac-478f-84a7-5cbb03baadba --- flight/Modules/GPS/GTOP_BIN.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flight/Modules/GPS/GTOP_BIN.c b/flight/Modules/GPS/GTOP_BIN.c index 41a6872c0..21308a32e 100644 --- a/flight/Modules/GPS/GTOP_BIN.c +++ b/flight/Modules/GPS/GTOP_BIN.c @@ -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))