diff --git a/src/drivers/device/i2c_posix.cpp b/src/drivers/device/i2c_posix.cpp index 5a9fb923e9..7a889a51d2 100644 --- a/src/drivers/device/i2c_posix.cpp +++ b/src/drivers/device/i2c_posix.cpp @@ -49,9 +49,15 @@ #include #include +#ifdef __PX4_QURT +#define PX4_SIMULATE_I2C 1 +#else #define PX4_SIMULATE_I2C 0 +#endif + static constexpr const int simulate = PX4_SIMULATE_I2C; + namespace device { @@ -104,10 +110,6 @@ I2C::init() return ret; } -#ifdef __PX4_QURT - simulate = true; -#endif - if (simulate) { _fd = 10000;