🖨️ Adds printing of feature flags

This commit is contained in:
Rune Harlyk
2025-03-23 16:27:56 +01:00
parent ad2d28c9ba
commit f864616303
6 changed files with 64 additions and 12 deletions
@@ -67,7 +67,7 @@ class Peripherals : public StatefulService<PeripheralsConfiguration> {
updatePins();
#if FT_ENABLED(USE_IMU)
#if FT_ENABLED(USE_MPU6050)
if (!_imu.initialize()) ESP_LOGE("IMUService", "IMU initialize failed");
#endif
#if FT_ENABLED(USE_MAG)
@@ -137,7 +137,7 @@ class Peripherals : public StatefulService<PeripheralsConfiguration> {
/* IMU FUNCTIONS */
bool readIMU() {
bool updated = false;
#if FT_ENABLED(USE_IMU)
#if FT_ENABLED(USE_MPU6050)
beginTransaction();
updated = _imu.readIMU();
endTransaction();
@@ -181,7 +181,7 @@ class Peripherals : public StatefulService<PeripheralsConfiguration> {
void emitIMU() {
doc.clear();
JsonObject root = doc.to<JsonObject>();
#if FT_ENABLED(USE_IMU)
#if FT_ENABLED(USE_MPU6050)
_imu.readIMU(root);
#endif
#if FT_ENABLED(USE_MAG)
@@ -214,7 +214,7 @@ class Peripherals : public StatefulService<PeripheralsConfiguration> {
JsonDocument doc;
char message[MAX_ESP_IMU_SIZE];
#if FT_ENABLED(USE_IMU)
#if FT_ENABLED(USE_MPU6050)
IMU _imu;
#endif
#if FT_ENABLED(USE_MAG)