mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-05 16:30:34 +08:00
mavlink: use reference instead of pointer to access the MAVLink instance from protocol classes
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
MavlinkTimesync::MavlinkTimesync(Mavlink *mavlink) :
|
||||
MavlinkTimesync::MavlinkTimesync(Mavlink &mavlink) :
|
||||
_mavlink(mavlink)
|
||||
{
|
||||
}
|
||||
@@ -66,7 +66,7 @@ MavlinkTimesync::handle_message(const mavlink_message_t *msg)
|
||||
rsync.tc1 = now * 1000ULL;
|
||||
rsync.ts1 = tsync.ts1;
|
||||
|
||||
mavlink_msg_timesync_send_struct(_mavlink->get_channel(), &rsync);
|
||||
mavlink_msg_timesync_send_struct(_mavlink.get_channel(), &rsync);
|
||||
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user