From f130b4a5801991ddb3f8db702a3d0a963e4be363 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 1 May 2017 16:22:35 +1000 Subject: [PATCH] Tracker: move init of DataFlash references into vehicle init This makes it look like the other vehicle types --- AntennaTracker/Log.cpp | 1 - AntennaTracker/system.cpp | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/AntennaTracker/Log.cpp b/AntennaTracker/Log.cpp index be31f0a686..11b93f9e20 100644 --- a/AntennaTracker/Log.cpp +++ b/AntennaTracker/Log.cpp @@ -90,7 +90,6 @@ void Tracker::start_logging() if (g.log_bitmask != 0) { if (!logging_started) { logging_started = true; - DataFlash.setVehicle_Startup_Log_Writer(FUNCTOR_BIND(&tracker, &Tracker::Log_Write_Vehicle_Startup_Messages, void)); DataFlash.StartNewLog(); } // enable writes diff --git a/AntennaTracker/system.cpp b/AntennaTracker/system.cpp index 3944ab48b9..fd53a0bc99 100644 --- a/AntennaTracker/system.cpp +++ b/AntennaTracker/system.cpp @@ -86,6 +86,9 @@ void Tracker::init_tracker() init_barometer(true); + // initialise DataFlash library + DataFlash.setVehicle_Startup_Log_Writer(FUNCTOR_BIND(&tracker, &Tracker::Log_Write_Vehicle_Startup_Messages, void)); + // set serial ports non-blocking serial_manager.set_blocking_writes_all(false);