sensors: allow up to 4 accels, gyros, and baros and add configurable rotations for accel & gyro

This commit is contained in:
Daniel Agar
2020-10-08 19:01:44 -04:00
committed by GitHub
parent 28956e0399
commit eecf2e7a1e
47 changed files with 2881 additions and 1163 deletions
@@ -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);