mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-27 04:30:34 +08:00
Code cleanup and ifdefs required for qurt build
Code that was previously out of tree that was #if 0, is now #ifdef __PX4_QURT. These changes were required for flight using the qurt build. Changes include code cleanup for shmem_posix.c. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
committed by
Julian Oes
parent
8634452d6d
commit
fea910d45a
@@ -72,11 +72,7 @@
|
||||
|
||||
#include "shmem.h"
|
||||
|
||||
#if 0
|
||||
# define debug(fmt, args...) do { warnx(fmt, ##args); } while(0)
|
||||
#else
|
||||
# define debug(fmt, args...) do { } while(0)
|
||||
#endif
|
||||
#define debug(fmt, args...) do { } while(0)
|
||||
|
||||
#define PARAM_OPEN open
|
||||
#define PARAM_CLOSE close
|
||||
@@ -89,7 +85,7 @@ extern struct param_info_s param_array[];
|
||||
extern struct param_info_s *param_info_base;
|
||||
extern struct param_info_s *param_info_limit;
|
||||
#else
|
||||
// FIXME - start and end are reversed
|
||||
// TODO: start and end are reversed
|
||||
static struct param_info_s *param_info_base = (struct param_info_s *) &px4_parameters;
|
||||
#endif
|
||||
|
||||
@@ -187,7 +183,7 @@ param_unlock(void)
|
||||
static void
|
||||
param_assert_locked(void)
|
||||
{
|
||||
/* XXX */
|
||||
/* TODO */
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -196,7 +192,6 @@ param_assert_locked(void)
|
||||
* @param param The parameter handle to test.
|
||||
* @return True if the handle is valid.
|
||||
*/
|
||||
//static bool
|
||||
bool
|
||||
handle_in_range(param_t param)
|
||||
{
|
||||
@@ -241,19 +236,11 @@ param_find_changed(param_t param)
|
||||
param_assert_locked();
|
||||
|
||||
if (param_values != NULL) {
|
||||
#if 0 /* utarray_find requires bsearch, not available */
|
||||
struct param_wbuf_s key;
|
||||
key.param = param;
|
||||
s = utarray_find(param_values, &key, param_compare_values);
|
||||
#else
|
||||
|
||||
while ((s = (struct param_wbuf_s *)utarray_next(param_values, s)) != NULL) {
|
||||
if (s->param == param) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
return s;
|
||||
@@ -282,7 +269,6 @@ param_find_internal(const char *name, bool notification)
|
||||
param_t param;
|
||||
|
||||
/* perform a linear search of the known parameters */
|
||||
|
||||
for (param = 0; handle_in_range(param); param++) {
|
||||
if (!strcmp(param_info_base[param].name, name)) {
|
||||
if (notification) {
|
||||
|
||||
Reference in New Issue
Block a user