diff --git a/libraries/AP_HAL_Linux/AnalogIn_IIO.cpp b/libraries/AP_HAL_Linux/AnalogIn_IIO.cpp index b011c902b2..5ad670791c 100644 --- a/libraries/AP_HAL_Linux/AnalogIn_IIO.cpp +++ b/libraries/AP_HAL_Linux/AnalogIn_IIO.cpp @@ -16,11 +16,11 @@ const char* AnalogSource_IIO::analog_sources[] = { }; AnalogSource_IIO::AnalogSource_IIO(int16_t pin, float initial_value, float voltage_scaling) : - _pin(pin), _value(initial_value), - _voltage_scaling(voltage_scaling), _sum_value(0), + _voltage_scaling(voltage_scaling), _sum_count(0), + _pin(pin), _pin_fd(-1) { init_pins(); diff --git a/libraries/AP_HAL_Linux/CANSocketIface.h b/libraries/AP_HAL_Linux/CANSocketIface.h index 1e4d01a7b4..32bdcbf3d3 100644 --- a/libraries/AP_HAL_Linux/CANSocketIface.h +++ b/libraries/AP_HAL_Linux/CANSocketIface.h @@ -58,8 +58,8 @@ class CANIface: public AP_HAL::CANIface { public: CANIface(int index) : _self_index(index) - , _frames_in_socket_tx_queue(0) , _max_frames_in_socket_tx_queue(2) + , _frames_in_socket_tx_queue(0) { } ~CANIface() { } diff --git a/libraries/AP_HAL_Linux/CameraSensor_Mt9v117.cpp b/libraries/AP_HAL_Linux/CameraSensor_Mt9v117.cpp index 32fe9ed363..ba53789c8a 100644 --- a/libraries/AP_HAL_Linux/CameraSensor_Mt9v117.cpp +++ b/libraries/AP_HAL_Linux/CameraSensor_Mt9v117.cpp @@ -113,8 +113,8 @@ CameraSensor_Mt9v117::CameraSensor_Mt9v117(const char *device_path, uint16_t nrst_gpio, uint32_t clock_freq) : CameraSensor(device_path) , _dev(std::move(dev)) - , _nrst_gpio(nrst_gpio) , _clock_freq(clock_freq) + , _nrst_gpio(nrst_gpio) { if (!_dev) { AP_HAL::panic("Could not find I2C bus for CameraSensor_Mt9v117"); diff --git a/libraries/AP_HAL_Linux/GPIO_Sysfs.cpp b/libraries/AP_HAL_Linux/GPIO_Sysfs.cpp index 34db881593..9e38e53ccf 100644 --- a/libraries/AP_HAL_Linux/GPIO_Sysfs.cpp +++ b/libraries/AP_HAL_Linux/GPIO_Sysfs.cpp @@ -36,8 +36,8 @@ union gpio_params { #define GPIO_PATH_MAX (sizeof(GPIO_BASE_PATH) + sizeof(gpio_params) - 1) DigitalSource_Sysfs::DigitalSource_Sysfs(unsigned pin, int value_fd) - : _pin(pin) - , _value_fd(value_fd) + : _value_fd(value_fd) + , _pin(pin) { } diff --git a/libraries/AP_HAL_Linux/PWM_Sysfs.cpp b/libraries/AP_HAL_Linux/PWM_Sysfs.cpp index 680f82ec51..9c7997e242 100644 --- a/libraries/AP_HAL_Linux/PWM_Sysfs.cpp +++ b/libraries/AP_HAL_Linux/PWM_Sysfs.cpp @@ -33,12 +33,12 @@ namespace Linux { PWM_Sysfs_Base::PWM_Sysfs_Base(char* export_path, char* polarity_path, char* enable_path, char* duty_path, char* period_path, uint8_t channel) - : _export_path(export_path) + : _channel(channel) + , _export_path(export_path) , _polarity_path(polarity_path) , _enable_path(enable_path) , _duty_path(duty_path) , _period_path(period_path) - , _channel(channel) { } diff --git a/libraries/AP_HAL_Linux/RCInput_RPI.h b/libraries/AP_HAL_Linux/RCInput_RPI.h index 8d398eec5f..84ca95295b 100644 --- a/libraries/AP_HAL_Linux/RCInput_RPI.h +++ b/libraries/AP_HAL_Linux/RCInput_RPI.h @@ -116,7 +116,8 @@ private: prev_tick(0), delta_time(0), width_s0(0), width_s1(0), curr_signal(0), last_signal(0), - enable_pin(0), state(RCIN_RPI_INITIAL_STATE) + state(RCIN_RPI_INITIAL_STATE), + enable_pin(0) {} uint64_t prev_tick; diff --git a/libraries/AP_HAL_Linux/RCOutput_PCA9685.cpp b/libraries/AP_HAL_Linux/RCOutput_PCA9685.cpp index 4c88645963..3b8a4877b3 100644 --- a/libraries/AP_HAL_Linux/RCOutput_PCA9685.cpp +++ b/libraries/AP_HAL_Linux/RCOutput_PCA9685.cpp @@ -62,8 +62,8 @@ RCOutput_PCA9685::RCOutput_PCA9685(AP_HAL::OwnPtr dev, uint32_t external_clock, uint8_t channel_offset, int16_t oe_pin_number) : - _dev(std::move(dev)), _enable_pin(nullptr), + _dev(std::move(dev)), _frequency(50), _pulses_buffer(NEW_NOTHROW uint16_t[PWM_CHAN_COUNT - channel_offset]), _external_clock(external_clock),