43 #include <px4_platform_common/tasks.h> 44 #include <px4_platform_common/sem.h> 52 #include <v2.0/mavlink_types.h> 94 do {}
while (px4_sem_wait(&
_lock) != 0);
109 mavlink_command_long_t command = {};
TimestampedList< command_item_t > _commands
static const unsigned MAX_MAVLINK_CHANNEL
High-resolution timer with callouts and timekeeping.
static constexpr uint64_t TIMEOUT_US
static MavlinkCommandSender * _instance
void handle_mavlink_command_ack(const mavlink_command_ack_t &ack, uint8_t from_sysid, uint8_t from_compid, uint8_t channel)
Handle mavlink command_ack.
MavlinkCommandSender operator=(const MavlinkCommandSender &)=delete
__BEGIN_DECLS typedef uint64_t hrt_abstime
Absolute time, in microsecond units.
static constexpr uint8_t RETRIES
static void initialize()
initialize: call this once on startup (this function is not thread-safe!)
static MavlinkCommandSender & instance()
MavlinkCommandSender()=default
void check_timeout(mavlink_channel_t channel)
Check timeouts to verify if an commands need retransmission.
int handle_vehicle_command(const struct vehicle_command_s &command, mavlink_channel_t channel)
Send a command on a channel and keep it in a queue for retransmission.