diff --git a/libraries/AP_HAL_ChibiOS/CANFDIface.cpp b/libraries/AP_HAL_ChibiOS/CANFDIface.cpp index 4d57effbc9..4d258e1c46 100644 --- a/libraries/AP_HAL_ChibiOS/CANFDIface.cpp +++ b/libraries/AP_HAL_ChibiOS/CANFDIface.cpp @@ -167,9 +167,9 @@ static inline void handleCANInterrupt(uint8_t phys_index, uint8_t line_index) uint32_t CANIface::FDCANMessageRAMOffset_ = 0; CANIface::CANIface(uint8_t index) : - self_index_(index), rx_bytebuffer_((uint8_t*)rx_buffer, sizeof(rx_buffer)), - rx_queue_(&rx_bytebuffer_) + rx_queue_(&rx_bytebuffer_), + self_index_(index) { if (index >= HAL_NUM_CAN_IFACES) { AP_HAL::panic("Bad CANIface index."); diff --git a/libraries/AP_HAL_ChibiOS/CanIface.cpp b/libraries/AP_HAL_ChibiOS/CanIface.cpp index 172e412b0e..90badc4158 100644 --- a/libraries/AP_HAL_ChibiOS/CanIface.cpp +++ b/libraries/AP_HAL_ChibiOS/CanIface.cpp @@ -140,9 +140,9 @@ const uint32_t CANIface::TSR_ABRQx[CANIface::NumTxMailboxes] = { CANIface::CANIface(uint8_t index) : - self_index_(index), rx_bytebuffer_((uint8_t*)rx_buffer, sizeof(rx_buffer)), - rx_queue_(&rx_bytebuffer_) + rx_queue_(&rx_bytebuffer_), + self_index_(index) { if (index >= HAL_NUM_CAN_IFACES) { AP_HAL::panic("Bad CANIface index."); diff --git a/libraries/AP_HAL_ChibiOS/I2CDevice.cpp b/libraries/AP_HAL_ChibiOS/I2CDevice.cpp index 6a9514df9f..12bead827b 100644 --- a/libraries/AP_HAL_ChibiOS/I2CDevice.cpp +++ b/libraries/AP_HAL_ChibiOS/I2CDevice.cpp @@ -261,11 +261,11 @@ I2CDeviceManager::I2CDeviceManager(void) } I2CDevice::I2CDevice(uint8_t busnum, uint8_t address, uint32_t bus_clock, bool use_smbus, uint32_t timeout_ms) : + bus(I2CDeviceManager::businfo[busnum]), _retries(2), _address(address), _use_smbus(use_smbus), - _timeout_ms(timeout_ms), - bus(I2CDeviceManager::businfo[busnum]) + _timeout_ms(timeout_ms) { set_device_bus(busnum+HAL_I2C_BUS_BASE); set_device_address(address); diff --git a/libraries/AP_HAL_ChibiOS/UARTDriver.cpp b/libraries/AP_HAL_ChibiOS/UARTDriver.cpp index 87c511163e..6b769b7f1e 100644 --- a/libraries/AP_HAL_ChibiOS/UARTDriver.cpp +++ b/libraries/AP_HAL_ChibiOS/UARTDriver.cpp @@ -103,8 +103,8 @@ static const eventmask_t EVT_TRANSMIT_UNBUFFERED = EVENT_MASK(3); #endif UARTDriver::UARTDriver(uint8_t _serial_num) : -serial_num(_serial_num), sdef(_serial_tab[_serial_num]), +serial_num(_serial_num), _baudrate(57600) { osalDbgAssert(serial_num < UART_MAX_DRIVERS, "too many SERIALn drivers");