i2c_posix: fix simulate variable cannot be assigned on QuRT

This commit is contained in:
Beat Küng
2017-07-13 16:53:28 +02:00
parent 46a7287178
commit eeb1895922
+6 -4
View File
@@ -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;