DataFlash: handle mavlink messages, not just remote-log-block-statuses

This commit is contained in:
Peter Barker 2017-06-15 13:29:50 +10:00 committed by Francisco Ferreira
parent 4af3b31128
commit 5c19f09cd7
2 changed files with 8 additions and 9 deletions

View File

@ -460,12 +460,14 @@ bool DataFlash_Class::logging_started(void) {
return false;
}
// for DataFlash_MAVLink
void DataFlash_Class::remote_log_block_status_msg(mavlink_channel_t chan,
mavlink_message_t* msg) {
FOR_EACH_BACKEND(remote_log_block_status_msg(chan, msg));
void DataFlash_Class::handle_mavlink_msg(mavlink_channel_t chan, mavlink_message_t* msg)
{
switch (msg->msgid) {
case MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS:
FOR_EACH_BACKEND(remote_log_block_status_msg(chan, msg));
break;
}
}
// end for DataFlash_MAVLink
void DataFlash_Class::periodic_tasks() {
FOR_EACH_BACKEND(periodic_tasks());

View File

@ -178,10 +178,7 @@ public:
void flush(void);
#endif
// for DataFlash_MAVLink:
void remote_log_block_status_msg(mavlink_channel_t chan,
mavlink_message_t* msg);
// end for DataFlash_MAVLink:
void handle_mavlink_msg(mavlink_channel_t chan, mavlink_message_t* msg);
void periodic_tasks(); // may want to split this into GCS/non-GCS duties