|
|
@ -1,7 +1,8 @@ |
|
|
|
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
|
|
|
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
|
|
|
|
|
|
|
|
|
|
|
/// @file GCS.h
|
|
|
|
/// @file GCS.h
|
|
|
|
/// @brief Interface definition for the various Ground Control System protocols.
|
|
|
|
/// @brief Interface definition for the various Ground Control System
|
|
|
|
|
|
|
|
// protocols.
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GCS_H |
|
|
|
#ifndef __GCS_H |
|
|
|
#define __GCS_H |
|
|
|
#define __GCS_H |
|
|
@ -49,7 +50,8 @@ public: |
|
|
|
///
|
|
|
|
///
|
|
|
|
/// This may involve checking for received bytes on the stream,
|
|
|
|
/// This may involve checking for received bytes on the stream,
|
|
|
|
/// or sending additional periodic messages.
|
|
|
|
/// or sending additional periodic messages.
|
|
|
|
void update(void) {} |
|
|
|
void update(void) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// Send a message with a single numeric parameter.
|
|
|
|
/// Send a message with a single numeric parameter.
|
|
|
|
///
|
|
|
|
///
|
|
|
@ -59,21 +61,24 @@ public: |
|
|
|
/// @param id ID of the message to send.
|
|
|
|
/// @param id ID of the message to send.
|
|
|
|
/// @param param Explicit message parameter.
|
|
|
|
/// @param param Explicit message parameter.
|
|
|
|
///
|
|
|
|
///
|
|
|
|
void send_message(enum ap_message id) {} |
|
|
|
void send_message(enum ap_message id) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// Send a text message.
|
|
|
|
/// Send a text message.
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// @param severity A value describing the importance of the message.
|
|
|
|
/// @param severity A value describing the importance of the message.
|
|
|
|
/// @param str The text to be sent.
|
|
|
|
/// @param str The text to be sent.
|
|
|
|
///
|
|
|
|
///
|
|
|
|
void send_text(gcs_severity severity, const char *str) {} |
|
|
|
void send_text(gcs_severity severity, const char *str) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// Send a text message with a PSTR()
|
|
|
|
/// Send a text message with a PSTR()
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// @param severity A value describing the importance of the message.
|
|
|
|
/// @param severity A value describing the importance of the message.
|
|
|
|
/// @param str The text to be sent.
|
|
|
|
/// @param str The text to be sent.
|
|
|
|
///
|
|
|
|
///
|
|
|
|
void send_text(gcs_severity severity, const prog_char_t *str) {} |
|
|
|
void send_text(gcs_severity severity, const prog_char_t *str) { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// send streams which match frequency range
|
|
|
|
// send streams which match frequency range
|
|
|
|
void data_stream_send(void); |
|
|
|
void data_stream_send(void); |
|
|
@ -137,23 +142,33 @@ private: |
|
|
|
|
|
|
|
|
|
|
|
/// Perform queued sending operations
|
|
|
|
/// Perform queued sending operations
|
|
|
|
///
|
|
|
|
///
|
|
|
|
AP_Param *_queued_parameter; ///< next parameter to be sent in queue
|
|
|
|
AP_Param * _queued_parameter; ///< next parameter to
|
|
|
|
enum ap_var_type _queued_parameter_type; ///< type of the next parameter
|
|
|
|
// be sent in queue
|
|
|
|
AP_Param::ParamToken _queued_parameter_token;///AP_Param token for next() call
|
|
|
|
enum ap_var_type _queued_parameter_type; ///< type of the next
|
|
|
|
uint16_t _queued_parameter_index; ///< next queued parameter's index
|
|
|
|
// parameter
|
|
|
|
uint16_t _queued_parameter_count; ///< saved count of parameters for queued send
|
|
|
|
AP_Param::ParamToken _queued_parameter_token; ///AP_Param token for
|
|
|
|
|
|
|
|
// next() call
|
|
|
|
|
|
|
|
uint16_t _queued_parameter_index; ///< next queued
|
|
|
|
|
|
|
|
// parameter's index
|
|
|
|
|
|
|
|
uint16_t _queued_parameter_count; ///< saved count of
|
|
|
|
|
|
|
|
// parameters for
|
|
|
|
|
|
|
|
// queued send
|
|
|
|
|
|
|
|
|
|
|
|
/// Count the number of reportable parameters.
|
|
|
|
/// Count the number of reportable parameters.
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// Not all parameters can be reported via MAVlink. We count the number that are
|
|
|
|
/// Not all parameters can be reported via MAVlink. We count the number
|
|
|
|
/// so that we can report to a GCS the number of parameters it should expect when it
|
|
|
|
// that are
|
|
|
|
|
|
|
|
/// so that we can report to a GCS the number of parameters it should
|
|
|
|
|
|
|
|
// expect when it
|
|
|
|
/// requests the full set.
|
|
|
|
/// requests the full set.
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// @return The number of reportable parameters.
|
|
|
|
/// @return The number of reportable parameters.
|
|
|
|
///
|
|
|
|
///
|
|
|
|
uint16_t _count_parameters(); ///< count reportable parameters
|
|
|
|
uint16_t _count_parameters(); ///< count reportable
|
|
|
|
|
|
|
|
// parameters
|
|
|
|
|
|
|
|
|
|
|
|
uint16_t _parameter_count; ///< cache of reportable parameters
|
|
|
|
uint16_t _parameter_count; ///< cache of reportable
|
|
|
|
|
|
|
|
// parameters
|
|
|
|
|
|
|
|
|
|
|
|
mavlink_channel_t chan; |
|
|
|
mavlink_channel_t chan; |
|
|
|
uint16_t packet_drops; |
|
|
|
uint16_t packet_drops; |
|
|
|