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:
Andrew Tridgell 2017-12-13 12:06:13 +11:00
parent a3e07f66a1
commit c72c1de99e

View File

@ -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)
{