AP_HAL_ChibiOS: re-order initialiser lines so -Werror=reorder will work

This commit is contained in:
Peter Barker 2024-09-20 22:20:43 +10:00 committed by Peter Barker
parent 2ddec1f9f4
commit 8b9154d115
4 changed files with 7 additions and 7 deletions

View File

@ -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.");

View File

@ -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.");

View File

@ -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);

View File

@ -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");