@@ -67,13 +67,13 @@ class Peripherals : public StatefulService<PeripheralsConfiguration> {
6767
6868 updatePins ();
6969
70- #if FT_ENABLED(USE_MPU6050)
70+ #if FT_ENABLED(USE_MPU6050 || USE_BNO055 )
7171 if (!_imu.initialize ()) ESP_LOGE (" IMUService" , " IMU initialize failed" );
7272#endif
73- #if FT_ENABLED(USE_MAG )
73+ #if FT_ENABLED(USE_HMC5883 )
7474 if (!_mag.initialize ()) ESP_LOGE (" IMUService" , " MAG initialize failed" );
7575#endif
76- #if FT_ENABLED(USE_BMP )
76+ #if FT_ENABLED(USE_BMP180 )
7777 if (!_bmp.initialize ()) ESP_LOGE (" IMUService" , " BMP initialize failed" );
7878#endif
7979#if FT_ENABLED(USE_USS)
@@ -137,7 +137,7 @@ class Peripherals : public StatefulService<PeripheralsConfiguration> {
137137 /* IMU FUNCTIONS */
138138 bool readIMU () {
139139 bool updated = false ;
140- #if FT_ENABLED(USE_MPU6050)
140+ #if FT_ENABLED(USE_MPU6050 || USE_BNO055 )
141141 beginTransaction ();
142142 updated = _imu.readIMU ();
143143 endTransaction ();
@@ -147,7 +147,7 @@ class Peripherals : public StatefulService<PeripheralsConfiguration> {
147147
148148 bool readMag () {
149149 bool updated = false ;
150- #if FT_ENABLED(USE_MAG )
150+ #if FT_ENABLED(USE_HMC5883 )
151151 beginTransaction ();
152152 updated = _mag.readMagnetometer ();
153153 endTransaction ();
@@ -157,7 +157,7 @@ class Peripherals : public StatefulService<PeripheralsConfiguration> {
157157
158158 bool readBMP () {
159159 bool updated = false ;
160- #if FT_ENABLED(USE_BMP )
160+ #if FT_ENABLED(USE_BMP180 )
161161 beginTransaction ();
162162 updated = _bmp.readBarometer ();
163163 endTransaction ();
@@ -181,13 +181,13 @@ class Peripherals : public StatefulService<PeripheralsConfiguration> {
181181 void emitIMU () {
182182 doc.clear ();
183183 JsonObject root = doc.to <JsonObject>();
184- #if FT_ENABLED(USE_MPU6050)
184+ #if FT_ENABLED(USE_MPU6050 || USE_BNO055 )
185185 _imu.readIMU (root);
186186#endif
187- #if FT_ENABLED(USE_MAG )
187+ #if FT_ENABLED(USE_HMC5883 )
188188 _mag.readMagnetometer (root);
189189#endif
190- #if FT_ENABLED(USE_BMP )
190+ #if FT_ENABLED(USE_BMP180 )
191191 _bmp.readBarometer (root);
192192#endif
193193 serializeJson (doc, message);
@@ -214,13 +214,13 @@ class Peripherals : public StatefulService<PeripheralsConfiguration> {
214214
215215 JsonDocument doc;
216216 char message[MAX_ESP_IMU_SIZE];
217- #if FT_ENABLED(USE_MPU6050)
217+ #if FT_ENABLED(USE_MPU6050 || USE_BNO055 )
218218 IMU _imu;
219219#endif
220- #if FT_ENABLED(USE_MAG )
220+ #if FT_ENABLED(USE_HMC5883 )
221221 Magnetometer _mag;
222222#endif
223- #if FT_ENABLED(USE_BMP )
223+ #if FT_ENABLED(USE_BMP180 )
224224 Barometer _bmp;
225225#endif
226226#if FT_ENABLED(USE_USS)
0 commit comments