diff --git a/esp32/include/peripherals/imu.h b/esp32/include/peripherals/imu.h index 4120d56..c849e79 100644 --- a/esp32/include/peripherals/imu.h +++ b/esp32/include/peripherals/imu.h @@ -44,7 +44,7 @@ class IMU : public SensorBase { #if USE_ICM20948_SPIMODE > 0 _imu.begin(CS_PIN, SPI_PORT); #else - _imu.begin(Wire, 1); + _imu.begin(Wire, 1, 0xFF); #endif if (_imu.status != ICM_20948_Stat_Ok){ return false; } diff --git a/esp32/include/peripherals/peripherals.h b/esp32/include/peripherals/peripherals.h index e92d522..0f9b7e0 100644 --- a/esp32/include/peripherals/peripherals.h +++ b/esp32/include/peripherals/peripherals.h @@ -77,7 +77,7 @@ class Peripherals : public StatefulService { #if FT_ENABLED(USE_MPU6050 || USE_BNO055 || USE_ICM20948) IMU _imu; #endif -#if FT_ENABLED(USE_HMC5883 || USE_ICM20948) +#if FT_ENABLED(USE_HMC5883) // TODO: Add USE_ICM20948 Magnetometer _mag; #endif #if FT_ENABLED(USE_BMP180) diff --git a/esp32/src/features.cpp b/esp32/src/features.cpp index ad53396..e9cdba5 100644 --- a/esp32/src/features.cpp +++ b/esp32/src/features.cpp @@ -16,6 +16,8 @@ void printFeatureConfiguration() { ESP_LOGI("Features", "USE_HMC5883: %s", USE_HMC5883 ? "enabled" : "disabled"); ESP_LOGI("Features", "USE_BMP180: %s", USE_BMP180 ? "enabled" : "disabled"); ESP_LOGI("Features", "USE_USS: %s", USE_USS ? "enabled" : "disabled"); + ESP_LOGI("Features", "USE_PAJ7620U2: %s", USE_PAJ7620U2 ? "enabled" : "disabled"); + ESP_LOGI("Features", "USE_PCA9685: %s", USE_PCA9685 ? "enabled" : "disabled"); ESP_LOGI("Features", "USE_WS2812: %s", USE_WS2812 ? "enabled" : "disabled"); diff --git a/esp32/src/peripherals/peripherals.cpp b/esp32/src/peripherals/peripherals.cpp index 2c5dcb0..ccdaa25 100644 --- a/esp32/src/peripherals/peripherals.cpp +++ b/esp32/src/peripherals/peripherals.cpp @@ -19,7 +19,7 @@ void Peripherals::begin() { #if FT_ENABLED(USE_MPU6050 || USE_BNO055 || USE_ICM20948) if (!_imu.initialize()) ESP_LOGE("IMUService", "IMU initialize failed"); #endif -#if FT_ENABLED(USE_HMC5883 || USE_ICM20948) +#if FT_ENABLED(USE_HMC5883) // TODO: Add USE_ICM20948 if (!_mag.initialize()) ESP_LOGE("IMUService", "MAG initialize failed"); #endif #if FT_ENABLED(USE_BMP180) @@ -111,7 +111,7 @@ bool Peripherals::readImu() { bool Peripherals::readMag() { bool updated = false; -#if FT_ENABLED(USE_HMC5883) +#if FT_ENABLED(USE_HMC5883) // TODO: Add USE_ICM20948 beginTransaction(); updated = _mag.update(); endTransaction();