ArduRover: use static method to construct controllers
This commit is contained in:
parent
e10c60e492
commit
e98ccb9ae6
@ -29,7 +29,6 @@ Rover::Rover(void) :
|
||||
channel_aux(nullptr),
|
||||
DataFlash(DataFlash_Class::create(fwver.fw_string, g.log_bitmask)),
|
||||
modes(&g.mode1),
|
||||
L1_controller(ahrs, nullptr),
|
||||
nav_controller(&L1_controller),
|
||||
control_mode(&mode_initializing),
|
||||
home(ahrs.get_home()),
|
||||
|
@ -173,7 +173,7 @@ private:
|
||||
// Arming/Disarming management class
|
||||
AP_Arming_Rover arming = AP_Arming_Rover::create(ahrs, barometer, compass, battery);
|
||||
|
||||
AP_L1_Control L1_controller;
|
||||
AP_L1_Control L1_controller = AP_L1_Control::create(ahrs, nullptr);
|
||||
|
||||
// selected navigation controller
|
||||
AP_Navigation *nav_controller;
|
||||
|
Loading…
Reference in New Issue
Block a user