cmake don't build param "c" files and remove param defines

- these aren't actual source code
This commit is contained in:
Daniel Agar
2019-11-11 10:25:42 -05:00
parent f984c4e450
commit 1c4e854f93
42 changed files with 34 additions and 68 deletions
+2 -1
View File
@@ -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)
-21
View File
@@ -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.
*/