@ -2,9 +2,7 @@
/// @brief One size fits all header for MAVLink integration.
/// @brief One size fits all header for MAVLink integration.
# pragma once
# pragma once
# include <AP_HAL/AP_HAL.h>
# include <AP_Param/AP_Param.h>
# include <AP_Param/AP_Param.h>
# include <AP_Math/AP_Math.h>
// we have separate helpers disabled to make it possible
// we have separate helpers disabled to make it possible
// to select MAVLink 1.0 in the arduino GUI build
// to select MAVLink 1.0 in the arduino GUI build
@ -53,28 +51,8 @@ static inline bool valid_channel(mavlink_channel_t chan)
# pragma clang diagnostic pop
# pragma clang diagnostic pop
}
}
/// Send a byte to the nominated MAVLink channel
///
/// @param chan Channel to send to
/// @param ch Byte to send
///
static inline void comm_send_ch ( mavlink_channel_t chan , uint8_t chr )
{
if ( ! valid_channel ( chan ) ) {
return ;
}
mavlink_comm_port [ chan ] - > write ( chr ) ;
}
void comm_send_buffer ( mavlink_channel_t chan , const uint8_t * buf , uint8_t len ) ;
void comm_send_buffer ( mavlink_channel_t chan , const uint8_t * buf , uint8_t len ) ;
/// Read a byte from the nominated MAVLink channel
///
/// @param chan Channel to receive on
/// @returns Byte read
///
uint8_t comm_receive_ch ( mavlink_channel_t chan ) ;
/// Check for available data on the nominated MAVLink channel
/// Check for available data on the nominated MAVLink channel
///
///
/// @param chan Channel to check
/// @param chan Channel to check
@ -88,12 +66,6 @@ uint16_t comm_get_available(mavlink_channel_t chan);
/// @returns Number of bytes available
/// @returns Number of bytes available
uint16_t comm_get_txspace ( mavlink_channel_t chan ) ;
uint16_t comm_get_txspace ( mavlink_channel_t chan ) ;
/*
return true if the MAVLink parser is idle , so there is no partly parsed
MAVLink message being processed
*/
bool comm_is_idle ( mavlink_channel_t chan ) ;
# define MAVLINK_USE_CONVENIENCE_FUNCTIONS
# define MAVLINK_USE_CONVENIENCE_FUNCTIONS
# include "include/mavlink/v2.0/ardupilotmega/mavlink.h"
# include "include/mavlink/v2.0/ardupilotmega/mavlink.h"