mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-30 01:54:06 +08:00
MAVLink app: Zero-initialize whole struct
This commit is contained in:
parent
81039a2940
commit
ff77884c2c
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user