mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-05 19:00:35 +08:00
lots' of header juggling and small changes to make mc att control compile for NuttX and ROS
This commit is contained in:
@@ -42,7 +42,8 @@
|
||||
* parameter needs to set to the key (magic).
|
||||
*/
|
||||
|
||||
#include <systemlib/param/param.h>
|
||||
#include <px4.h>
|
||||
#include <systemlib/circuit_breaker_params.h>
|
||||
#include <systemlib/circuit_breaker.h>
|
||||
|
||||
/**
|
||||
@@ -56,7 +57,7 @@
|
||||
* @max 894281
|
||||
* @group Circuit Breaker
|
||||
*/
|
||||
PARAM_DEFINE_INT32(CBRK_SUPPLY_CHK, 0);
|
||||
PX4_PARAM_DEFINE_INT32(CBRK_SUPPLY_CHK);
|
||||
|
||||
/**
|
||||
* Circuit breaker for rate controller output
|
||||
@@ -69,7 +70,7 @@ PARAM_DEFINE_INT32(CBRK_SUPPLY_CHK, 0);
|
||||
* @max 140253
|
||||
* @group Circuit Breaker
|
||||
*/
|
||||
PARAM_DEFINE_INT32(CBRK_RATE_CTRL, 0);
|
||||
PX4_PARAM_DEFINE_INT32(CBRK_RATE_CTRL);
|
||||
|
||||
/**
|
||||
* Circuit breaker for IO safety
|
||||
@@ -81,7 +82,7 @@ PARAM_DEFINE_INT32(CBRK_RATE_CTRL, 0);
|
||||
* @max 22027
|
||||
* @group Circuit Breaker
|
||||
*/
|
||||
PARAM_DEFINE_INT32(CBRK_IO_SAFETY, 0);
|
||||
PX4_PARAM_DEFINE_INT32(CBRK_IO_SAFETY);
|
||||
|
||||
/**
|
||||
* Circuit breaker for airspeed sensor
|
||||
@@ -93,7 +94,7 @@ PARAM_DEFINE_INT32(CBRK_IO_SAFETY, 0);
|
||||
* @max 162128
|
||||
* @group Circuit Breaker
|
||||
*/
|
||||
PARAM_DEFINE_INT32(CBRK_AIRSPD_CHK, 0);
|
||||
PX4_PARAM_DEFINE_INT32(CBRK_AIRSPD_CHK);
|
||||
|
||||
/**
|
||||
* Circuit breaker for flight termination
|
||||
@@ -106,7 +107,7 @@ PARAM_DEFINE_INT32(CBRK_AIRSPD_CHK, 0);
|
||||
* @max 121212
|
||||
* @group Circuit Breaker
|
||||
*/
|
||||
PARAM_DEFINE_INT32(CBRK_FLIGHTTERM, 121212);
|
||||
PX4_PARAM_DEFINE_INT32(CBRK_FLIGHTTERM);
|
||||
|
||||
/**
|
||||
* Circuit breaker for engine failure detection
|
||||
@@ -120,7 +121,7 @@ PARAM_DEFINE_INT32(CBRK_FLIGHTTERM, 121212);
|
||||
* @max 284953
|
||||
* @group Circuit Breaker
|
||||
*/
|
||||
PARAM_DEFINE_INT32(CBRK_ENGINEFAIL, 284953);
|
||||
PX4_PARAM_DEFINE_INT32(CBRK_ENGINEFAIL);
|
||||
|
||||
/**
|
||||
* Circuit breaker for gps failure detection
|
||||
@@ -134,7 +135,7 @@ PARAM_DEFINE_INT32(CBRK_ENGINEFAIL, 284953);
|
||||
* @max 240024
|
||||
* @group Circuit Breaker
|
||||
*/
|
||||
PARAM_DEFINE_INT32(CBRK_GPSFAIL, 240024);
|
||||
PX4_PARAM_DEFINE_INT32(CBRK_GPSFAIL);
|
||||
|
||||
bool circuit_breaker_enabled(const char* breaker, int32_t magic)
|
||||
{
|
||||
|
||||
@@ -61,8 +61,14 @@
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
__EXPORT bool circuit_breaker_enabled(const char* breaker, int32_t magic);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
__EXPORT bool circuit_breaker_enabled(const char* breaker, int32_t magic);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif /* CIRCUIT_BREAKER_H_ */
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#define PARAM_CBRK_SUPPLY_CHK_DEFAULT 0
|
||||
#define PARAM_CBRK_RATE_CTRL_DEFAULT 0
|
||||
#define PARAM_CBRK_IO_SAFETY_DEFAULT 0
|
||||
#define PARAM_CBRK_AIRSPD_CHK_DEFAULT 0
|
||||
#define PARAM_CBRK_FLIGHTTERM_DEFAULT 121212
|
||||
#define PARAM_CBRK_ENGINEFAIL_DEFAULT 284953
|
||||
#define PARAM_CBRK_GPSFAIL_DEFAULT 240024
|
||||
@@ -40,6 +40,7 @@
|
||||
#define _SYSTEMLIB_PERF_COUNTER_H value
|
||||
|
||||
#include <stdint.h>
|
||||
#include <platforms/px4_defines.h>
|
||||
|
||||
/**
|
||||
* Counter types.
|
||||
|
||||
Reference in New Issue
Block a user