mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 09:58:28 -04:00
DataFlash: StartUnstartedLogging replaces logging_started/start_logging
This commit is contained in:
parent
b2724852aa
commit
cc7d75ea5d
@ -278,6 +278,17 @@ void DataFlash_Class::backend_starting_new_log(const DataFlash_Backend *backend)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// start any backend which hasn't started; this is only called from
|
||||||
|
// the vehicle code
|
||||||
|
void DataFlash_Class::StartUnstartedLogging(void)
|
||||||
|
{
|
||||||
|
for (uint8_t i=0; i<_next_backend; i++) {
|
||||||
|
if (!backends[i]->logging_started()) {
|
||||||
|
backends[i]->start_new_log();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#define FOR_EACH_BACKEND(methodcall) \
|
#define FOR_EACH_BACKEND(methodcall) \
|
||||||
do { \
|
do { \
|
||||||
for (uint8_t i=0; i<_next_backend; i++) { \
|
for (uint8_t i=0; i<_next_backend; i++) { \
|
||||||
|
@ -105,7 +105,9 @@ public:
|
|||||||
|
|
||||||
void setVehicle_Startup_Log_Writer(vehicle_startup_message_Log_Writer writer);
|
void setVehicle_Startup_Log_Writer(vehicle_startup_message_Log_Writer writer);
|
||||||
|
|
||||||
void StartNewLog(void);
|
/* poke backends to start if they're not already started */
|
||||||
|
void StartUnstartedLogging(void);
|
||||||
|
|
||||||
void EnableWrites(bool enable);
|
void EnableWrites(bool enable);
|
||||||
|
|
||||||
void StopLogging();
|
void StopLogging();
|
||||||
|
@ -582,18 +582,6 @@ void DataFlash_Block::ListAvailableLogs(AP_HAL::BetterStream *port)
|
|||||||
port->printf("\n");
|
port->printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function starts a new log file in the DataFlash, and writes
|
|
||||||
// the format of supported messages in the log
|
|
||||||
// This function is ONLY called from the vehicle code.
|
|
||||||
// DataFlash_MAVLink, for example, will NOT call this function if the
|
|
||||||
// remote end disconnects and reconnects!
|
|
||||||
void DataFlash_Class::StartNewLog(void)
|
|
||||||
{
|
|
||||||
for (uint8_t i=0; i<_next_backend; i++) {
|
|
||||||
backends[i]->start_new_log();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
write a structure format to the log - should be in frontend
|
write a structure format to the log - should be in frontend
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user