mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 10:33:33 +08:00
uORB::Publication improvements and cleanup (#14784)
- create common uORB::PublicationBase - uORB::PublicationQueued types are now type aliases - ORB_PRIO use enum type everywhere to avoid accidental misuse - PX4Accelerometer/PX4Gyroscope/etc driver libs explicitly advertise on construction, unadvertise on destruction. This is a workaround for any potential issues that might appear when accel/gyro cdev and uORB indexing doesn't align.
This commit is contained in:
@@ -56,7 +56,7 @@ BMI088_accel::BMI088_accel(I2CSPIBusOption bus_option, int bus, const char *path
|
||||
enum Rotation rotation,
|
||||
int bus_frequency, spi_mode_e spi_mode) :
|
||||
BMI088("bmi088_accel", path_accel, bus_option, bus, DRV_ACC_DEVTYPE_BMI088, device, spi_mode, bus_frequency, rotation),
|
||||
_px4_accel(get_device_id(), (external() ? ORB_PRIO_MAX - 1 : ORB_PRIO_HIGH - 1), rotation),
|
||||
_px4_accel(get_device_id(), (external() ? ORB_PRIO_VERY_HIGH : ORB_PRIO_DEFAULT), rotation),
|
||||
_sample_perf(perf_alloc(PC_ELAPSED, "bmi088_accel_read")),
|
||||
_bad_transfers(perf_alloc(PC_COUNT, "bmi088_accel_bad_transfers")),
|
||||
_bad_registers(perf_alloc(PC_COUNT, "bmi088_accel_bad_registers")),
|
||||
|
||||
Reference in New Issue
Block a user