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
+2 -13
View File
@@ -42,6 +42,7 @@
*/
#include <px4_config.h>
#include <px4_defines.h>
#include <drivers/device/i2c.h>
@@ -81,12 +82,6 @@
#define SF1XX_DEVICE_PATH "/dev/sf1xx"
/* 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
@@ -234,7 +229,7 @@ SF1XX::~SF1XX()
int
SF1XX::init()
{
int ret = ERROR;
int ret = PX4_ERROR;
int hw_model;
param_get(param_find("SENS_EN_SF1XX"), &hw_model);
@@ -653,12 +648,6 @@ SF1XX::print_info()
namespace sf1xx
{
/* oddly, ERROR is not defined for c++ */
#ifdef ERROR
# undef ERROR
#endif
const int ERROR = -1;
SF1XX *g_dev;
void start();