Browse Source

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
master
Andrew Tridgell 7 years ago
parent
commit
1c503ee459
  1. 4
      libraries/SRV_Channel/SRV_Channel.h

4
libraries/SRV_Channel/SRV_Channel.h

@ -438,11 +438,11 @@ private: @@ -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];

Loading…
Cancel
Save