mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-21 16:18:29 -04:00
GCS_MAVLINK: added set_dataflash() method
This commit is contained in:
parent
119cf6bb13
commit
5080201be6
@ -181,6 +181,13 @@ public:
|
||||
*/
|
||||
static bool find_by_mavtype(uint8_t mav_type, uint8_t &sysid, uint8_t &compid, mavlink_channel_t &channel) { return routing.find_by_mavtype(mav_type, sysid, compid, channel); }
|
||||
|
||||
/*
|
||||
set a dataflash pointer for logging
|
||||
*/
|
||||
static void set_dataflash(DataFlash_Class *dataflash) {
|
||||
dataflash_p = dataflash;
|
||||
}
|
||||
|
||||
private:
|
||||
void handleMessage(mavlink_message_t * msg);
|
||||
|
||||
@ -280,6 +287,9 @@ private:
|
||||
// mavlink routing object
|
||||
static MAVLink_routing routing;
|
||||
|
||||
// pointer to static dataflash for logging of text messages
|
||||
static DataFlash_Class *dataflash_p;
|
||||
|
||||
// a vehicle can optionally snoop on messages for other systems
|
||||
static void (*msg_snoop)(const mavlink_message_t* msg);
|
||||
|
||||
|
@ -42,6 +42,9 @@ static uint8_t mavlink_locked_mask;
|
||||
// routing table
|
||||
MAVLink_routing GCS_MAVLINK::routing;
|
||||
|
||||
// static dataflash pointer to support logging text messages
|
||||
DataFlash_Class *GCS_MAVLINK::dataflash_p;
|
||||
|
||||
// snoop function for vehicle types that want to see messages for
|
||||
// other targets
|
||||
void (*GCS_MAVLINK::msg_snoop)(const mavlink_message_t* msg) = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user