AP_RSSI: 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:14 +11:00
parent 9b4fef4d50
commit 076f7bc0cf
1 changed files with 1 additions and 5 deletions

View File

@ -28,9 +28,7 @@ public:
RSSI_RECEIVER = 3 RSSI_RECEIVER = 3
}; };
static AP_RSSI create() { return AP_RSSI{}; } AP_RSSI();
constexpr AP_RSSI(AP_RSSI &&other) = default;
/* Do not allow copies */ /* Do not allow copies */
AP_RSSI(const AP_RSSI &other) = delete; AP_RSSI(const AP_RSSI &other) = delete;
@ -57,8 +55,6 @@ public:
static const struct AP_Param::GroupInfo var_info[]; static const struct AP_Param::GroupInfo var_info[];
private: private:
AP_RSSI();
// RSSI parameters // RSSI parameters
AP_Int8 rssi_type; // Type of RSSI being used AP_Int8 rssi_type; // Type of RSSI being used
AP_Int8 rssi_analog_pin; // Analog pin RSSI value found on AP_Int8 rssi_analog_pin; // Analog pin RSSI value found on