diff --git a/APMrover2/Rover.cpp b/APMrover2/Rover.cpp index f4ecf65387..91c6278139 100644 --- a/APMrover2/Rover.cpp +++ b/APMrover2/Rover.cpp @@ -27,7 +27,7 @@ Rover::Rover(void) : channel_steer(nullptr), channel_throttle(nullptr), channel_aux(nullptr), - DataFlash{fwver.fw_string, g.log_bitmask}, + DataFlash(DataFlash_Class::create(fwver.fw_string, g.log_bitmask)), modes(&g.mode1), L1_controller(ahrs, nullptr), nav_controller(&L1_controller), diff --git a/AntennaTracker/AntennaTracker.cpp b/AntennaTracker/AntennaTracker.cpp index da12f3b78a..f689a9c0ab 100644 --- a/AntennaTracker/AntennaTracker.cpp +++ b/AntennaTracker/AntennaTracker.cpp @@ -128,7 +128,7 @@ void Tracker::ten_hz_logging_loop() const AP_HAL::HAL& hal = AP_HAL::get_HAL(); Tracker::Tracker(void) - : DataFlash{fwver.fw_string, g.log_bitmask} + : DataFlash(DataFlash_Class::create(fwver.fw_string, g.log_bitmask)) { memset(¤t_loc, 0, sizeof(current_loc)); memset(&vehicle, 0, sizeof(vehicle)); diff --git a/ArduCopter/Copter.cpp b/ArduCopter/Copter.cpp index 8697c8e2df..bf2b6c39db 100644 --- a/ArduCopter/Copter.cpp +++ b/ArduCopter/Copter.cpp @@ -23,8 +23,8 @@ const AP_HAL::HAL& hal = AP_HAL::get_HAL(); /* constructor for main Copter class */ -Copter::Copter(void) : - DataFlash{fwver.fw_string, g.log_bitmask}, +Copter::Copter(void) + : DataFlash(DataFlash_Class::create(fwver.fw_string, g.log_bitmask)), flight_modes(&g.flight_mode1), mission(ahrs, FUNCTOR_BIND_MEMBER(&Copter::start_command, bool, const AP_Mission::Mission_Command &), diff --git a/ArduPlane/Plane.cpp b/ArduPlane/Plane.cpp index fe304dd626..44d47348a1 100644 --- a/ArduPlane/Plane.cpp +++ b/ArduPlane/Plane.cpp @@ -24,7 +24,7 @@ const AP_HAL::HAL& hal = AP_HAL::get_HAL(); constructor for main Plane class */ Plane::Plane(void) - : DataFlash{fwver.fw_string, g.log_bitmask} + : DataFlash(DataFlash_Class::create(fwver.fw_string, g.log_bitmask)) { // C++11 doesn't allow in-class initialisation of bitfields auto_state.takeoff_complete = true; diff --git a/ArduSub/Sub.cpp b/ArduSub/Sub.cpp index c16204d76a..e705575681 100644 --- a/ArduSub/Sub.cpp +++ b/ArduSub/Sub.cpp @@ -23,8 +23,8 @@ const AP_HAL::HAL& hal = AP_HAL::get_HAL(); /* constructor for main Sub class */ -Sub::Sub(void) : - DataFlash {fwver.fw_string, g.log_bitmask}, +Sub::Sub(void) + : DataFlash(DataFlash_Class::create(fwver.fw_string, g.log_bitmask)), mission(ahrs, FUNCTOR_BIND_MEMBER(&Sub::start_command, bool, const AP_Mission::Mission_Command &), FUNCTOR_BIND_MEMBER(&Sub::verify_command_callback, bool, const AP_Mission::Mission_Command &), diff --git a/Tools/Replay/Replay.h b/Tools/Replay/Replay.h index 7df8b3fdd9..994fea67cf 100644 --- a/Tools/Replay/Replay.h +++ b/Tools/Replay/Replay.h @@ -71,7 +71,7 @@ public: AP_Vehicle::FixedWing aparm; AP_Airspeed airspeed; AP_Int32 unused; // logging is magic for Replay; this is unused - DataFlash_Class dataflash{"Replay v0.1", unused}; + DataFlash_Class dataflash = DataFlash_Class::create("Replay v0.1", unused); private: Parameters g; diff --git a/libraries/DataFlash/examples/DataFlash_AllTypes/DataFlash_AllTypes.cpp b/libraries/DataFlash/examples/DataFlash_AllTypes/DataFlash_AllTypes.cpp index 3f3e164982..7cde912204 100644 --- a/libraries/DataFlash/examples/DataFlash_AllTypes/DataFlash_AllTypes.cpp +++ b/libraries/DataFlash/examples/DataFlash_AllTypes/DataFlash_AllTypes.cpp @@ -72,7 +72,7 @@ public: private: AP_Int32 log_bitmask; - DataFlash_Class dataflash{"DF AllTypes 0.1", log_bitmask}; + DataFlash_Class dataflash = DataFlash_Class::create("DF AllTypes 0.1", log_bitmask); void print_mode(AP_HAL::BetterStream *port, uint8_t mode); void Log_Write_TypeMessages(); diff --git a/libraries/DataFlash/examples/DataFlash_test/DataFlash_test.cpp b/libraries/DataFlash/examples/DataFlash_test/DataFlash_test.cpp index 8c0b73e249..37c4a5cd20 100644 --- a/libraries/DataFlash/examples/DataFlash_test/DataFlash_test.cpp +++ b/libraries/DataFlash/examples/DataFlash_test/DataFlash_test.cpp @@ -36,7 +36,7 @@ public: private: AP_Int32 log_bitmask; - DataFlash_Class dataflash{"DF Test 0.1", log_bitmask}; + DataFlash_Class dataflash = DataFlash_Class::create("DF Test 0.1", log_bitmask); void print_mode(AP_HAL::BetterStream *port, uint8_t mode); };