mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
Sub: move init of DataFlash references into vehicle init
It is possible to start a log before the existing codepath is crossed.
This commit is contained in:
parent
74e0d6c60a
commit
652292e5c0
@ -472,8 +472,6 @@ void Sub::start_logging()
|
||||
if (g.log_bitmask != 0 && !in_log_download) {
|
||||
if (!ap.logging_started) {
|
||||
ap.logging_started = true;
|
||||
DataFlash.set_mission(&mission);
|
||||
DataFlash.setVehicle_Startup_Log_Writer(FUNCTOR_BIND(&sub, &Sub::Log_Write_Vehicle_Startup_Messages, void));
|
||||
DataFlash.StartNewLog();
|
||||
} else if (!DataFlash.logging_started()) {
|
||||
hal.console->println("Starting new log");
|
||||
|
@ -165,6 +165,10 @@ void Sub::init_ardupilot()
|
||||
// initialise mission library
|
||||
mission.init();
|
||||
|
||||
// initialise DataFlash library
|
||||
DataFlash.set_mission(&mission);
|
||||
DataFlash.setVehicle_Startup_Log_Writer(FUNCTOR_BIND(&sub, &Sub::Log_Write_Vehicle_Startup_Messages, void));
|
||||
|
||||
startup_INS_ground();
|
||||
|
||||
// we don't want writes to the serial port to cause us to pause
|
||||
|
Loading…
Reference in New Issue
Block a user