]> git.droids-corp.org - protos/imu.git/commitdiff
fix gps message when position is not correct master
authorOlivier Matz <zer0@droids-corp.org>
Thu, 24 Jul 2014 16:17:43 +0000 (18:17 +0200)
committerOlivier Matz <zer0@droids-corp.org>
Thu, 24 Jul 2014 16:17:43 +0000 (18:17 +0200)
i2c_protocol.c

index 319da9e1fed0b15a41a5cad905319406320a4223..cdb739923f95b139cfa8ae61e0c66017e3a7baad 100644 (file)
@@ -82,6 +82,7 @@ static void i2c_send_status(void)
        gps_get_pos(&gps_pos);
        IRQ_UNLOCK(irq_flags);
 
        gps_get_pos(&gps_pos);
        IRQ_UNLOCK(irq_flags);
 
+       ans.flags = 0;
        if (gps_pos_valid(&gps_pos)) {
                ans.flags |= IMUBOARD_STATUS_GPS_OK;
                ans.latitude = gps_pos.latitude;
        if (gps_pos_valid(&gps_pos)) {
                ans.flags |= IMUBOARD_STATUS_GPS_OK;
                ans.latitude = gps_pos.latitude;