global: use static method to construct Compass

This commit is contained in:
Lucas De Marchi 2017-08-08 07:50:58 -07:00 committed by Francisco Ferreira
parent 320260a151
commit c1a957fbf3
10 changed files with 10 additions and 10 deletions

View File

@ -153,7 +153,7 @@ private:
// sensor drivers
AP_GPS gps;
AP_Baro barometer = AP_Baro::create();
Compass compass;
Compass compass = Compass::create();
AP_InertialSensor ins;
RangeFinder rangefinder { serial_manager, ROTATION_NONE };
AP_Button button;

View File

@ -108,7 +108,7 @@ private:
AP_Baro barometer = AP_Baro::create();
Compass compass;
Compass compass = Compass::create();
AP_InertialSensor ins;

View File

@ -198,7 +198,7 @@ private:
AP_Int8 *flight_modes;
AP_Baro barometer = AP_Baro::create();
Compass compass;
Compass compass = Compass::create();
AP_InertialSensor ins;
RangeFinder rangefinder {serial_manager, ROTATION_PITCH_270};

View File

@ -201,7 +201,7 @@ private:
AP_Int8 *flight_modes = &g.flight_mode1;
AP_Baro barometer = AP_Baro::create();
Compass compass;
Compass compass = Compass::create();
AP_InertialSensor ins;

View File

@ -167,7 +167,7 @@ private:
TSYS01 celsius;
AP_Baro barometer = AP_Baro::create();
Compass compass;
Compass compass = Compass::create();
AP_InertialSensor ins;
RangeFinder rangefinder {serial_manager, ROTATION_PITCH_270};

View File

@ -61,7 +61,7 @@ public:
AP_InertialSensor ins;
AP_Baro barometer = AP_Baro::create();
AP_GPS gps;
Compass compass;
Compass compass = Compass::create();
AP_SerialManager serial_manager;
RangeFinder rng {serial_manager, ROTATION_PITCH_270};
NavEKF2 EKF2{&ahrs, barometer, rng};

View File

@ -16,7 +16,7 @@ const AP_HAL::HAL& hal = AP_HAL::get_HAL();
// INS and Baro declaration
AP_InertialSensor ins;
Compass compass;
static Compass compass = Compass::create();
AP_GPS gps;
static AP_Baro barometer = AP_Baro::create();

View File

@ -9,7 +9,7 @@
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
static Compass compass;
static Compass compass = Compass::create();
uint32_t timer;

View File

@ -17,7 +17,7 @@ private:
AP_InertialSensor ins;
AP_Baro baro = AP_Baro::create();
AP_GPS gps;
Compass compass;
Compass compass = Compass::create();
AP_AHRS_DCM ahrs{ins, baro, gps};
// global constants that control how many verify calls must be made for a command before it completes

View File

@ -23,7 +23,7 @@ class DummyVehicle {
public:
AP_GPS gps;
AP_Baro barometer = AP_Baro::create();
Compass compass;
Compass compass = Compass::create();
AP_InertialSensor ins;
AP_SerialManager serial_manager;
RangeFinder sonar {serial_manager, ROTATION_PITCH_270};