mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-05 07:28:29 -04:00
global: use static method to construct AP_Mount
This commit is contained in:
parent
563f9bfe89
commit
18aa88b329
@ -31,9 +31,6 @@ Rover::Rover(void) :
|
||||
modes(&g.mode1),
|
||||
L1_controller(ahrs, nullptr),
|
||||
nav_controller(&L1_controller),
|
||||
#if MOUNT == ENABLED
|
||||
camera_mount(ahrs, current_loc),
|
||||
#endif
|
||||
control_mode(&mode_initializing),
|
||||
home(ahrs.get_home()),
|
||||
G_Dt(0.02f)
|
||||
|
@ -217,7 +217,7 @@ private:
|
||||
// Camera/Antenna mount tracking and stabilisation stuff
|
||||
#if MOUNT == ENABLED
|
||||
// current_loc uses the baro/gps solution for altitude rather than gps only.
|
||||
AP_Mount camera_mount;
|
||||
AP_Mount camera_mount = AP_Mount::create(ahrs, current_loc);
|
||||
#endif
|
||||
|
||||
// true if initialisation has completed
|
||||
|
@ -66,9 +66,6 @@ Copter::Copter(void)
|
||||
mainLoop_count(0),
|
||||
rtl_loiter_start_time(0),
|
||||
auto_trim_counter(0),
|
||||
#if MOUNT == ENABLED
|
||||
camera_mount(ahrs, current_loc),
|
||||
#endif
|
||||
#if AC_FENCE == ENABLED
|
||||
fence(ahrs, inertial_nav),
|
||||
#endif
|
||||
|
@ -549,7 +549,7 @@ private:
|
||||
// Camera/Antenna mount tracking and stabilisation stuff
|
||||
#if MOUNT == ENABLED
|
||||
// current_loc uses the baro/gps soloution for altitude rather than gps only.
|
||||
AP_Mount camera_mount;
|
||||
AP_Mount camera_mount = AP_Mount::create(ahrs, current_loc);
|
||||
#endif
|
||||
|
||||
// AC_Fence library to reduce fly-aways
|
||||
|
@ -764,11 +764,11 @@ private:
|
||||
|
||||
// last time home was updated while disarmed
|
||||
uint32_t last_home_update_ms;
|
||||
|
||||
|
||||
// Camera/Antenna mount tracking and stabilisation stuff
|
||||
#if MOUNT == ENABLED
|
||||
// current_loc uses the baro/gps soloution for altitude rather than gps only.
|
||||
AP_Mount camera_mount {ahrs, current_loc};
|
||||
AP_Mount camera_mount = AP_Mount::create(ahrs, current_loc);
|
||||
#endif
|
||||
|
||||
// Arming/Disarming mangement class
|
||||
|
@ -59,9 +59,6 @@ Sub::Sub(void)
|
||||
pmTest1(0),
|
||||
fast_loopTimer(0),
|
||||
mainLoop_count(0),
|
||||
#if MOUNT == ENABLED
|
||||
camera_mount(ahrs, current_loc),
|
||||
#endif
|
||||
#if AC_FENCE == ENABLED
|
||||
fence(ahrs, inertial_nav),
|
||||
#endif
|
||||
|
@ -421,7 +421,7 @@ private:
|
||||
// Camera/Antenna mount tracking and stabilisation stuff
|
||||
#if MOUNT == ENABLED
|
||||
// current_loc uses the baro/gps soloution for altitude rather than gps only.
|
||||
AP_Mount camera_mount;
|
||||
AP_Mount camera_mount = AP_Mount::create(ahrs, current_loc);
|
||||
#endif
|
||||
|
||||
// AC_Fence library to reduce fly-aways
|
||||
|
Loading…
Reference in New Issue
Block a user