diff --git a/src/main/target/MICOAIR743/CMakeLists.txt b/src/main/target/MICOAIR743/CMakeLists.txt index 1d381638780..6847f3daefe 100644 --- a/src/main/target/MICOAIR743/CMakeLists.txt +++ b/src/main/target/MICOAIR743/CMakeLists.txt @@ -1 +1,2 @@ -target_stm32h743xi(MICOAIR743) \ No newline at end of file +target_stm32h743xi(MICOAIR743) +target_stm32h743xi(MICOAIR743_EXTMAG) diff --git a/src/main/target/MICOAIR743/target.h b/src/main/target/MICOAIR743/target.h index 52ebef24e1b..526cf438d08 100644 --- a/src/main/target/MICOAIR743/target.h +++ b/src/main/target/MICOAIR743/target.h @@ -100,7 +100,14 @@ #define BARO_I2C_BUS BUS_I2C2 #define USE_MAG + +#ifdef MICOAIR743_EXTMAG +// External compass +#define MAG_I2C_BUS BUS_I2C1 +#else +// Onboard compass #define MAG_I2C_BUS BUS_I2C2 +#endif #define USE_MAG_ALL // *************** ENABLE OPTICAL FLOW & RANGEFINDER *****************************