GCS_MAVLink: update routing example for mavlink namespacing

This commit is contained in:
Peter Barker 2016-05-28 10:56:07 +10:00 committed by Andrew Tridgell
parent df190d1e86
commit 03ded35d7c
1 changed files with 21 additions and 1 deletions

View File

@ -10,8 +10,28 @@
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
class GCS_MAVLINK_routing : public GCS_MAVLINK
{
public:
void data_stream_send(void) override { };
protected:
private:
float adjust_rate_for_stream_trigger(enum streams stream_num) override { return 0.0f; }
void handleMessage(mavlink_message_t * msg) { }
bool handle_guided_request(AP_Mission::Mission_Command &cmd) override { return false ; }
void handle_change_alt_request(AP_Mission::Mission_Command &cmd) override { }
bool try_send_message(enum ap_message id) override { return false; }
};
static const uint8_t num_gcs = MAVLINK_COMM_NUM_BUFFERS;
static GCS_MAVLINK gcs[MAVLINK_COMM_NUM_BUFFERS];
static GCS_MAVLINK_routing gcs[MAVLINK_COMM_NUM_BUFFERS];
extern mavlink_system_t mavlink_system;