mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 06:33:33 +08:00
sensors: allow up to 4 accels, gyros, and baros and add configurable rotations for accel & gyro
This commit is contained in:
@@ -98,6 +98,10 @@ void VehicleAirData::SensorCorrectionsUpdate(bool force)
|
||||
case 2:
|
||||
_thermal_offset[baro_index] = corrections.baro_offset_2;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
_thermal_offset[baro_index] = corrections.baro_offset_3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ private:
|
||||
void ParametersUpdate();
|
||||
void SensorCorrectionsUpdate(bool force = false);
|
||||
|
||||
static constexpr int MAX_SENSOR_COUNT = 3;
|
||||
static constexpr int MAX_SENSOR_COUNT = 4;
|
||||
|
||||
uORB::Publication<vehicle_air_data_s> _vehicle_air_data_pub{ORB_ID(vehicle_air_data)};
|
||||
|
||||
@@ -81,7 +81,8 @@ private:
|
||||
uORB::SubscriptionCallbackWorkItem _sensor_sub[MAX_SENSOR_COUNT] {
|
||||
{this, ORB_ID(sensor_baro), 0},
|
||||
{this, ORB_ID(sensor_baro), 1},
|
||||
{this, ORB_ID(sensor_baro), 2}
|
||||
{this, ORB_ID(sensor_baro), 2},
|
||||
{this, ORB_ID(sensor_baro), 3},
|
||||
};
|
||||
|
||||
perf_counter_t _cycle_perf{perf_alloc(PC_ELAPSED, MODULE_NAME": cycle")};
|
||||
|
||||
Reference in New Issue
Block a user