diff --git a/src/drivers/ist8310/ist8310.cpp b/src/drivers/ist8310/ist8310.cpp index 03b191fdad..26822b2437 100644 --- a/src/drivers/ist8310/ist8310.cpp +++ b/src/drivers/ist8310/ist8310.cpp @@ -41,6 +41,7 @@ */ #include +#include #include #include @@ -178,12 +179,6 @@ enum IST8310_BUS { IST8310_BUS_I2C_INTERNAL = 2, }; -/* oddly, ERROR is not defined for c++ */ -#ifdef ERROR -# undef ERROR -#endif -static const int ERROR = -1; - #ifndef CONFIG_SCHED_WORKQUEUE # error This requires CONFIG_SCHED_WORKQUEUE. #endif @@ -458,7 +453,7 @@ IST8310::~IST8310() int IST8310::init() { - int ret = ERROR; + int ret = PX4_ERROR; ret = I2C::init(); @@ -1143,7 +1138,7 @@ out: if (check_scale()) { /* failed */ PX4_WARN("FAILED: SCALE"); - ret = ERROR; + ret = PX4_ERROR; } } @@ -1271,12 +1266,6 @@ IST8310::print_info() namespace ist8310 { -/* oddly, ERROR is not defined for c++ */ -#ifdef ERROR -# undef ERROR -#endif -const int ERROR = -1; - /* list of supported bus configurations */