From 3ce58f7102f88e7b6cc40a28f4fb8f9a31a2997b Mon Sep 17 00:00:00 2001 From: Mark Sauder Date: Wed, 2 Oct 2019 17:54:38 -0600 Subject: [PATCH] sensors: organize vars in voted_sensors_update.h --- src/modules/sensors/voted_sensors_update.h | 25 +++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/modules/sensors/voted_sensors_update.h b/src/modules/sensors/voted_sensors_update.h index cdb3548bc8..630c32b53e 100644 --- a/src/modules/sensors/voted_sensors_update.h +++ b/src/modules/sensors/voted_sensors_update.h @@ -256,34 +256,33 @@ private: vehicle_air_data_s _last_airdata[SENSOR_COUNT_MAX] {}; /**< latest sensor data from all sensors instances */ vehicle_magnetometer_s _last_magnetometer[SENSOR_COUNT_MAX] {}; /**< latest sensor data from all sensors instances */ - uint64_t _last_accel_timestamp[ACCEL_COUNT_MAX] {}; /**< latest full timestamp */ - matrix::Dcmf _board_rotation {}; /**< rotation matrix for the orientation that the board is mounted */ matrix::Dcmf _mag_rotation[MAG_COUNT_MAX] {}; /**< rotation matrix for the orientation that the external mag0 is mounted */ const Parameters &_parameters; const bool _hil_enabled{false}; /**< is hardware-in-the-loop mode enabled? */ - float _accel_diff[3][2] {}; /**< filtered accel differences between IMU units (m/s/s) */ - float _gyro_diff[3][2] {}; /**< filtered gyro differences between IMU uinits (rad/s) */ - float _mag_angle_diff[2] {}; /**< filtered mag angle differences between sensor instances (Ga) */ - - /* sensor thermal compensation */ - TemperatureCompensation _temperature_compensation{}; - sensor_correction_s _corrections {}; /**< struct containing the sensor corrections to be published to the uORB */ - sensor_selection_s _selection {}; /**< struct containing the sensor selection to be published to the uORB */ - subsystem_info_s _info {}; /**< subsystem info publication */ - bool _corrections_changed{false}; bool _selection_changed{false}; /**< true when a sensor selection has changed and not been published */ - uORB::PublicationQueued _info_pub{ORB_ID(subsystem_info)}; /* subsystem info publication */ + float _accel_diff[3][2] {}; /**< filtered accel differences between IMU units (m/s/s) */ + float _gyro_diff[3][2] {}; /**< filtered gyro differences between IMU uinits (rad/s) */ + float _mag_angle_diff[2] {}; /**< filtered mag angle differences between sensor instances (Ga) */ uint32_t _accel_device_id[SENSOR_COUNT_MAX] {}; /**< accel driver device id for each uorb instance */ uint32_t _baro_device_id[SENSOR_COUNT_MAX] {}; /**< baro driver device id for each uorb instance */ uint32_t _gyro_device_id[SENSOR_COUNT_MAX] {}; /**< gyro driver device id for each uorb instance */ uint32_t _mag_device_id[SENSOR_COUNT_MAX] {}; /**< mag driver device id for each uorb instance */ + uint64_t _last_accel_timestamp[ACCEL_COUNT_MAX] {}; /**< latest full timestamp */ + + sensor_correction_s _corrections {}; /**< struct containing the sensor corrections to be published to the uORB */ + sensor_selection_s _selection {}; /**< struct containing the sensor selection to be published to the uORB */ + subsystem_info_s _info {}; /**< subsystem info publication */ + + TemperatureCompensation _temperature_compensation{}; /**< sensor thermal compensation */ + + uORB::PublicationQueued _info_pub{ORB_ID(subsystem_info)}; /* subsystem info publication */ }; } /* namespace sensors */