mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 08:23:34 +08:00
cmake don't build param "c" files and remove param defines
- these aren't actual source code
This commit is contained in:
@@ -46,12 +46,13 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <px4_platform_common/defines.h>
|
||||
#include <lib/parameters/param.h>
|
||||
|
||||
bool circuit_breaker_enabled(const char *breaker, int32_t magic)
|
||||
{
|
||||
int32_t val = -1;
|
||||
|
||||
return (PX4_PARAM_GET_BYNAME(breaker, &val) == 0) && (val == magic);
|
||||
return (param_get(param_find(breaker), &val) == 0) && (val == magic);
|
||||
}
|
||||
|
||||
bool circuit_breaker_enabled_by_val(int32_t breaker_val, int32_t magic)
|
||||
|
||||
@@ -410,27 +410,6 @@ __EXPORT void param_print_status(void);
|
||||
*/
|
||||
__EXPORT void param_control_autosave(bool enable);
|
||||
|
||||
/*
|
||||
* Macros creating static parameter definitions.
|
||||
*
|
||||
* Note that these structures are not known by name; they are
|
||||
* collected into a section that is iterated by the parameter
|
||||
* code.
|
||||
*
|
||||
* Note that these macros cannot be used in C++ code due to
|
||||
* their use of designated initializers. They should probably
|
||||
* be refactored to avoid the use of a union for param_value_u.
|
||||
*/
|
||||
|
||||
/** define an int32 parameter */
|
||||
#define PARAM_DEFINE_INT32(_name, _default)
|
||||
|
||||
/** define a float parameter */
|
||||
#define PARAM_DEFINE_FLOAT(_name, _default)
|
||||
|
||||
/** define a parameter that points to a structure */
|
||||
#define PARAM_DEFINE_STRUCT(_name, _default)
|
||||
|
||||
/**
|
||||
* Parameter value union.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user