sensors : decouple maximum sensor count and allow flexible maximums

This commit is contained in:
Mohammed Kabir
2017-04-24 12:24:11 +02:00
committed by Kabir Mohammed
parent f0accd39f0
commit 57aa41df2c
5 changed files with 70 additions and 50 deletions
+9 -1
View File
@@ -43,6 +43,14 @@
namespace sensors
{
static const int SENSOR_COUNT_MAX = 3;
constexpr uint8_t MAG_COUNT_MAX = 4;
constexpr uint8_t GYRO_COUNT_MAX = 3;
constexpr uint8_t ACCEL_COUNT_MAX = 3;
constexpr uint8_t BARO_COUNT_MAX = 3;
constexpr uint8_t SENSOR_COUNT_MAX = math::max(MAG_COUNT_MAX,
math::max(GYRO_COUNT_MAX,
math::max(ACCEL_COUNT_MAX,
BARO_COUNT_MAX)));
} /* namespace sensors */