mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 06:53:34 +08:00
ist8310: remove undef
Use PX4_ERROR instead.
This commit is contained in:
committed by
Lorenz Meier
parent
04dac46eaf
commit
366ff1f3e9
@@ -41,6 +41,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <px4_config.h>
|
#include <px4_config.h>
|
||||||
|
#include <px4_defines.h>
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@@ -178,12 +179,6 @@ enum IST8310_BUS {
|
|||||||
IST8310_BUS_I2C_INTERNAL = 2,
|
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
|
#ifndef CONFIG_SCHED_WORKQUEUE
|
||||||
# error This requires CONFIG_SCHED_WORKQUEUE.
|
# error This requires CONFIG_SCHED_WORKQUEUE.
|
||||||
#endif
|
#endif
|
||||||
@@ -458,7 +453,7 @@ IST8310::~IST8310()
|
|||||||
int
|
int
|
||||||
IST8310::init()
|
IST8310::init()
|
||||||
{
|
{
|
||||||
int ret = ERROR;
|
int ret = PX4_ERROR;
|
||||||
|
|
||||||
ret = I2C::init();
|
ret = I2C::init();
|
||||||
|
|
||||||
@@ -1143,7 +1138,7 @@ out:
|
|||||||
if (check_scale()) {
|
if (check_scale()) {
|
||||||
/* failed */
|
/* failed */
|
||||||
PX4_WARN("FAILED: SCALE");
|
PX4_WARN("FAILED: SCALE");
|
||||||
ret = ERROR;
|
ret = PX4_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1271,12 +1266,6 @@ IST8310::print_info()
|
|||||||
namespace ist8310
|
namespace ist8310
|
||||||
{
|
{
|
||||||
|
|
||||||
/* oddly, ERROR is not defined for c++ */
|
|
||||||
#ifdef ERROR
|
|
||||||
# undef ERROR
|
|
||||||
#endif
|
|
||||||
const int ERROR = -1;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
list of supported bus configurations
|
list of supported bus configurations
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user