SRV_Channel: 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:15 +11:00
parent fd14dedcff
commit 1c503ee459

View File

@ -438,11 +438,11 @@ private:
static SRV_Channels *instance;
// support for Volz protocol
AP_Volz_Protocol volz = AP_Volz_Protocol::create();
AP_Volz_Protocol volz;
static AP_Volz_Protocol *volz_ptr;
// support for SBUS protocol
AP_SBusOut sbus = AP_SBusOut::create();
AP_SBusOut sbus;
static AP_SBusOut *sbus_ptr;
SRV_Channel obj_channels[NUM_SERVO_CHANNELS];