mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-14 22:33:34 +08:00
i2c_posix: fix simulate variable cannot be assigned on QuRT
This commit is contained in:
@@ -49,9 +49,15 @@
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user