From 366ff1f3e9e9593fc04f6cbc7c38b6bb0bd8bed2 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 22 Mar 2017 15:10:26 -0700 Subject: [PATCH] ist8310: remove undef Use PX4_ERROR instead. --- src/drivers/ist8310/ist8310.cpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) 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 */