From 0d7d6e1d2ac6f3677cad9826aebf2fe8df8f80b2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 9 Aug 2014 22:47:40 +1000 Subject: [PATCH] Plane: zero loc structure in HIL_STATE handling this avoids av AVR bug in HIL --- ArduPlane/GCS_Mavlink.pde | 1 + 1 file changed, 1 insertion(+) diff --git a/ArduPlane/GCS_Mavlink.pde b/ArduPlane/GCS_Mavlink.pde index 5206cf7f94..a227e36bd9 100644 --- a/ArduPlane/GCS_Mavlink.pde +++ b/ArduPlane/GCS_Mavlink.pde @@ -1392,6 +1392,7 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) // set gps hil sensor Location loc; + memset(&loc, 0, sizeof(loc)); loc.lat = packet.lat; loc.lng = packet.lon; loc.alt = packet.alt/10;