mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 01:53:35 +08:00
ERROR macro: get rid of the many 'oddly, ERROR is not defined for c++', use PX4_ERROR
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user