From dab1f835c784ede8ec62d6824296906b07649b38 Mon Sep 17 00:00:00 2001 From: Mark Charlebois Date: Thu, 21 Jan 2016 20:41:42 -0800 Subject: [PATCH] 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 --- src/modules/systemlib/param/param_shmem.c | 13 ++----------- src/platforms/posix/px4_layer/shmem_posix.c | 5 +---- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/modules/systemlib/param/param_shmem.c b/src/modules/systemlib/param/param_shmem.c index fe0d377f07..fe52effbe3 100644 --- a/src/modules/systemlib/param/param_shmem.c +++ b/src/modules/systemlib/param/param_shmem.c @@ -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 @@ -240,11 +236,6 @@ 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; diff --git a/src/platforms/posix/px4_layer/shmem_posix.c b/src/platforms/posix/px4_layer/shmem_posix.c index c6ed01776f..319d4287b6 100644 --- a/src/platforms/posix/px4_layer/shmem_posix.c +++ b/src/platforms/posix/px4_layer/shmem_posix.c @@ -1,7 +1,6 @@ - /**************************************************************************** * - * Copyright (c) 2015 Ramakrishna Kintada. All rights reserved. + * Copyright (c) 2015 Vijay Venkatraman. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,7 +31,6 @@ * ****************************************************************************/ - #include #include #include @@ -238,7 +236,6 @@ static void update_index_from_shmem(void) release_shmem_lock(); } - static void update_value_from_shmem(param_t param, union param_value_u *value) { unsigned int byte_changed, bit_changed;