MAVLink app: Zero-initialize whole struct

This commit is contained in:
Lorenz Meier 2015-10-24 20:27:14 +02:00
parent 81039a2940
commit ff77884c2c

View File

@ -977,7 +977,7 @@ protected:
struct vehicle_gps_position_s gps;
if (_gps_sub->update(&_gps_time, &gps)) {
mavlink_gps_raw_int_t msg;
mavlink_gps_raw_int_t msg = {};
msg.time_usec = gps.timestamp_position;
msg.fix_type = gps.fix_type;