mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 19:53:33 +08:00
sensors: allow up to 4 accels, gyros, and baros and add configurable rotations for accel & gyro
This commit is contained in:
@@ -42,8 +42,6 @@ namespace sensors
|
||||
using namespace matrix;
|
||||
using namespace time_literals;
|
||||
|
||||
static constexpr int32_t MAG_ROT_VAL_INTERNAL{-1};
|
||||
|
||||
static constexpr uint32_t SENSOR_TIMEOUT{300_ms};
|
||||
|
||||
VehicleMagnetometer::VehicleMagnetometer() :
|
||||
@@ -52,7 +50,7 @@ VehicleMagnetometer::VehicleMagnetometer() :
|
||||
{
|
||||
char str[20] {};
|
||||
|
||||
for (int mag_index = 0; mag_index < 4; mag_index++) {
|
||||
for (int mag_index = 0; mag_index < MAX_SENSOR_COUNT; mag_index++) {
|
||||
// CAL_MAGx_ID
|
||||
sprintf(str, "CAL_%s%u_ID", "MAG", mag_index);
|
||||
param_find(str);
|
||||
|
||||
Reference in New Issue
Block a user