Added PAJ7620U2 defs, set mag for ICM20948 temp
This commit is contained in:
@@ -18,7 +18,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)
|
||||
@@ -89,7 +89,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();
|
||||
@@ -169,7 +169,7 @@ void Peripherals::getIMUResult(JsonVariant &root) {
|
||||
JsonVariant imu = root["imu"].to<JsonVariant>();
|
||||
_imu.getResults(imu);
|
||||
#endif
|
||||
#if FT_ENABLED(USE_HMC5883 || USE_ICM20948)
|
||||
#if FT_ENABLED(USE_HMC5883) // TODO: Add USE_ICM20948
|
||||
JsonVariant mag = root["mag"].to<JsonVariant>();
|
||||
_mag.getResults(mag);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user