ERROR macro: get rid of the many 'oddly, ERROR is not defined for c++', use PX4_ERROR

This commit is contained in:
Beat Küng
2016-09-30 13:50:51 +02:00
committed by Julian Oes
parent c606554da3
commit 241fd629ce
42 changed files with 207 additions and 504 deletions
+3 -8
View File
@@ -37,6 +37,7 @@
*/
#include <px4_config.h>
#include <px4_defines.h>
#include <sys/types.h>
#include <stdint.h>
@@ -68,12 +69,6 @@
#define ACCEL_DEVICE_PATH "/dev/bma180"
/* oddly, ERROR is not defined for c++ */
#ifdef ERROR
# undef ERROR
#endif
static const int ERROR = -1;
#define DIR_READ (1<<7)
#define DIR_WRITE (0<<7)
@@ -275,7 +270,7 @@ BMA180::~BMA180()
int
BMA180::init()
{
int ret = ERROR;
int ret = PX4_ERROR;
/* do SPI init (and probe) first */
if (SPI::init() != OK) {
@@ -321,7 +316,7 @@ BMA180::init()
ret = OK;
} else {
ret = ERROR;
ret = PX4_ERROR;
}
_class_instance = register_class_devname(ACCEL_DEVICE_PATH);