void DataFlash_Class::set_vehicle_armed(const bool armed_state) { if (armed_state == _armed) { // no change in status return; } _armed = armed_state; if (!_armed) { // went from armed to disarmed FOR_EACH_BACKEND(vehicle_was_disarmed()); } }
void DataFlash_Class::handle_mavlink_msg(GCS_MAVLINK &link, mavlink_message_t* msg) { switch (msg->msgid) { case MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS: FOR_EACH_BACKEND(remote_log_block_status_msg(link.get_chan(), msg)); break; case MAVLINK_MSG_ID_LOG_REQUEST_LIST: /* fall through */ case MAVLINK_MSG_ID_LOG_REQUEST_DATA: /* fall through */ case MAVLINK_MSG_ID_LOG_ERASE: /* fall through */ case MAVLINK_MSG_ID_LOG_REQUEST_END: handle_log_message(link, msg); break; } }
void AP_Logger::handle_mavlink_msg(GCS_MAVLINK &link, mavlink_message_t* msg) { switch (msg->msgid) { case MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS: FOR_EACH_BACKEND(remote_log_block_status_msg(link.get_chan(), msg)); break; case MAVLINK_MSG_ID_LOG_REQUEST_LIST: FALLTHROUGH; case MAVLINK_MSG_ID_LOG_REQUEST_DATA: FALLTHROUGH; case MAVLINK_MSG_ID_LOG_ERASE: FALLTHROUGH; case MAVLINK_MSG_ID_LOG_REQUEST_END: handle_log_message(link, msg); break; } }
// 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::EnableWrites(bool enable) { FOR_EACH_BACKEND(EnableWrites(enable)); }
void AP_Logger::Prep() { FOR_EACH_BACKEND(Prep()); }
// change me to "DoTimeConsumingPreparations"? void DataFlash_Class::EraseAll() { FOR_EACH_BACKEND(EraseAll()); }
void DataFlash_Class::Log_Write_EntireMission(const AP_Mission &mission) { FOR_EACH_BACKEND(Log_Write_EntireMission(mission)); }
void DataFlash_Class::Log_Write_Mode(uint8_t mode, uint8_t reason) { FOR_EACH_BACKEND(Log_Write_Mode(mode, reason)); }
void AP_Logger::Write_Parameter(const char *name, float value) { FOR_EACH_BACKEND(Write_Parameter(name, value)); }
void AP_Logger::Write_Mission_Cmd(const AP_Mission &mission, const AP_Mission::Mission_Command &cmd) { FOR_EACH_BACKEND(Write_Mission_Cmd(mission, cmd)); }
void AP_Logger::Write_Message(const char *message) { FOR_EACH_BACKEND(Write_Message(message)); }
void AP_Logger::Write_Mode(uint8_t mode, uint8_t reason) { FOR_EACH_BACKEND(Write_Mode(mode, reason)); }
void AP_Logger::Write_EntireMission() { FOR_EACH_BACKEND(Write_EntireMission()); }
// currently only AP_Logger_File support this: void AP_Logger::flush(void) { FOR_EACH_BACKEND(flush()); }
void AP_Logger::periodic_tasks() { handle_log_send(); FOR_EACH_BACKEND(periodic_tasks()); }
void DataFlash_Class::periodic_tasks() { FOR_EACH_BACKEND(periodic_tasks()); }
void AP_Logger::Write_RallyPoint(uint8_t total, uint8_t sequence, const RallyLocation &rally_point) { FOR_EACH_BACKEND(Write_RallyPoint(total, sequence, rally_point)); }
// currently only DataFlash_File support this: void DataFlash_Class::flush(void) { FOR_EACH_BACKEND(flush()); }
void DataFlash_Class::Log_Write_Mission_Cmd(const AP_Mission &mission, const AP_Mission::Mission_Command &cmd) { FOR_EACH_BACKEND(Log_Write_Mission_Cmd(mission, cmd)); }
void DataFlash_Class::Log_Write_Message(const char *message) { FOR_EACH_BACKEND(Log_Write_Message(message)); }
void DataFlash_Class::WriteCriticalBlock(const void *pBuffer, uint16_t size) { FOR_EACH_BACKEND(WriteCriticalBlock(pBuffer, size)); }
void DataFlash_Class::Log_Write_Parameter(const char *name, float value) { FOR_EACH_BACKEND(Log_Write_Parameter(name, value)); }
void AP_Logger::StopLogging() { FOR_EACH_BACKEND(stop_logging()); }
void DataFlash_Class::set_mission(const AP_Mission *mission) { FOR_EACH_BACKEND(set_mission(mission)); }
void DataFlash_Class::StopLogging() { FOR_EACH_BACKEND(stop_logging()); }
void DataFlash_Class::WritePrioritisedBlock(const void *pBuffer, uint16_t size, bool is_critical) { FOR_EACH_BACKEND(WritePrioritisedBlock(pBuffer, size, is_critical)); }
void DataFlash_Class::Log_Write_Mode(uint8_t mode) { FOR_EACH_BACKEND(Log_Write_Mode(mode)); }
void DataFlash_Class::Prep() { FOR_EACH_BACKEND(Prep()); }
// change me to "DoTimeConsumingPreparations"? void AP_Logger::EraseAll() { FOR_EACH_BACKEND(EraseAll()); }