mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-05 15:33:57 -04:00
AP_Module: removed create() method for objects
See discussion here: https://github.com/ArduPilot/ardupilot/issues/7331 we were getting some uninitialised variables. While it only showed up in AP_SbusOut, it means we can't be sure it won't happen on other objects, so safest to remove the approach Thanks to assistance from Lucas, Peter and Francisco
This commit is contained in:
parent
a3e07f66a1
commit
c72c1de99e
@ -13,13 +13,13 @@ void loop();
|
||||
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
|
||||
|
||||
// sensor declaration
|
||||
static AP_InertialSensor ins = AP_InertialSensor::create();
|
||||
static AP_GPS gps = AP_GPS::create();
|
||||
static AP_Baro baro = AP_Baro::create();
|
||||
static AP_SerialManager serial_manager = AP_SerialManager::create();
|
||||
static AP_InertialSensor ins;
|
||||
static AP_GPS gps;
|
||||
static AP_Baro baro;
|
||||
static AP_SerialManager serial_manager;
|
||||
|
||||
// choose which AHRS system to use
|
||||
static AP_AHRS_DCM ahrs = AP_AHRS_DCM::create(ins, baro, gps);
|
||||
static AP_AHRS_DCM ahrs{ins, baro, gps};
|
||||
|
||||
void setup(void)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user