DataFlash: expose the number of lost log messages

will be logged in PM message
This commit is contained in:
Andrew Tridgell 2016-04-21 16:11:21 +10:00
parent 8683616d8c
commit c765979f9a
3 changed files with 15 additions and 0 deletions

View File

@ -203,6 +203,14 @@ void DataFlash_Class::Log_Write_Mission_Cmd(const AP_Mission &mission,
FOR_EACH_BACKEND(Log_Write_Mission_Cmd(mission, cmd));
}
uint32_t DataFlash_Class::num_dropped() const
{
if (_next_backend == 0) {
return 0;
}
return backends[0]->num_dropped();
}
// end functions pass straight through to backend

View File

@ -159,6 +159,9 @@ public:
void periodic_tasks(); // may want to split this into GCS/non-GCS duties
// number of blocks that have been dropped
uint32_t num_dropped(void) const;
vehicle_startup_message_Log_Writer _vehicle_messages;
// parameter support

View File

@ -94,6 +94,10 @@ public:
const AP_Param::ParamToken &token,
enum ap_var_type type);
uint32_t num_dropped(void) const {
return _dropped;
}
protected:
uint32_t dropped;
uint8_t internal_errors; // uint8_t - wishful thinking?