forked from Archive/PX4-Autopilot
remove unused
This commit is contained in:
parent
05b7dd0046
commit
51298c1eb1
6
Makefile
6
Makefile
|
@ -263,9 +263,9 @@ ifeq ($(VECTORCONTROL),1)
|
|||
endif
|
||||
|
||||
unittest: posix_sitl_test
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
export ASAN_OPTIONS=symbolize=1
|
||||
@export CC=clang
|
||||
@export CXX=clang++
|
||||
@export ASAN_OPTIONS=symbolize=1
|
||||
$(call cmake-build-other,unittest, ../unittests)
|
||||
@(cd build_unittest && ctest -j2 --output-on-failure)
|
||||
|
||||
|
|
|
@ -148,8 +148,8 @@ transition_result_t arming_state_transition(struct vehicle_status_s *status,
|
|||
|
||||
/* re-run the pre-flight check as long as sensors are failing */
|
||||
if (!status_flags->condition_system_sensors_initialized
|
||||
&& ((new_arming_state == vehicle_status_s::ARMING_STATE_ARMED
|
||||
|| new_arming_state == vehicle_status_s::ARMING_STATE_STANDBY))
|
||||
&& (new_arming_state == vehicle_status_s::ARMING_STATE_ARMED
|
||||
|| new_arming_state == vehicle_status_s::ARMING_STATE_STANDBY)
|
||||
&& status->hil_state == vehicle_status_s::HIL_STATE_OFF) {
|
||||
|
||||
if (last_preflight_check == 0 || hrt_absolute_time() - last_preflight_check > 1000 * 1000) {
|
||||
|
|
|
@ -27,7 +27,7 @@ else()
|
|||
endif()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -g")
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0 -g3 -fsanitize=address -fno-omit-frame-pointer")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3 -fsanitize=address -fno-omit-frame-pointer")
|
||||
|
||||
set(GTEST_DIR ${CMAKE_SOURCE_DIR}/googletest)
|
||||
add_subdirectory(${GTEST_DIR})
|
||||
|
@ -130,7 +130,7 @@ add_gtest(autodeclination_test)
|
|||
# mixer_test
|
||||
add_custom_command(OUTPUT ${PX4_SRC}/modules/systemlib/mixer/mixer_multirotor.generated.h
|
||||
COMMAND ${PX4_SRC}/modules/systemlib/mixer/multi_tables.py > ${PX4_SRC}/modules/systemlib/mixer/mixer_multirotor.generated.h)
|
||||
add_executable(mixer_test mixer_test.cpp hrt.cpp
|
||||
add_executable(mixer_test mixer_test.cpp
|
||||
${PX4_SRC}/modules/systemlib/mixer/mixer.cpp
|
||||
${PX4_SRC}/modules/systemlib/mixer/mixer_group.cpp
|
||||
${PX4_SRC}/modules/systemlib/mixer/mixer_load.c
|
||||
|
@ -146,17 +146,17 @@ add_executable(conversion_test conversion_test.cpp ${PX4_SRC}/systemcmds/tests/t
|
|||
add_gtest(conversion_test)
|
||||
|
||||
# sbus2_test
|
||||
add_executable(sbus2_test sbus2_test.cpp hrt.cpp
|
||||
add_executable(sbus2_test sbus2_test.cpp
|
||||
${PX4_SRC}/lib/rc/sbus.c)
|
||||
add_gtest(sbus2_test)
|
||||
|
||||
# DSM test
|
||||
add_executable(dsm_test dsm_test.cpp hrt.cpp
|
||||
add_executable(dsm_test dsm_test.cpp
|
||||
${PX4_SRC}/lib/rc/dsm.c)
|
||||
add_gtest(dsm_test)
|
||||
|
||||
# st24_test
|
||||
add_executable(rc_input_test st24_test.cpp hrt.cpp sumd_test.cpp
|
||||
add_executable(rc_input_test st24_test.cpp sumd_test.cpp
|
||||
${PX4_SRC}/lib/rc/st24.c
|
||||
${PX4_SRC}/lib/rc/sumd.c)
|
||||
add_gtest(rc_input_test)
|
||||
|
@ -167,13 +167,13 @@ add_executable(sf0x_test sf0x_test.cpp
|
|||
add_gtest(sf0x_test)
|
||||
|
||||
# param_test
|
||||
add_executable(param_test param_test.cpp hrt.cpp uorb_stub.cpp
|
||||
add_executable(param_test param_test.cpp uorb_stub.cpp
|
||||
${PX4_SRC}/modules/systemlib/bson/tinybson.c
|
||||
${PX4_SRC}/modules/systemlib/param/param.c)
|
||||
add_gtest(param_test)
|
||||
|
||||
# param_shmem_test
|
||||
#add_executable(param_shmem_test param_test.cpp hrt.cpp uorb_stub.cpp
|
||||
#add_executable(param_shmem_test param_test.cpp uorb_stub.cpp
|
||||
# ${PX4_SRC}/modules/systemlib/bson/tinybson.c
|
||||
# ${PX4_SRC}/modules/systemlib/param/param_shmem.c)
|
||||
#add_gtest(param_shmem_test)
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <systemlib/err.h>
|
||||
#define lowsyslog warnx
|
||||
#define dbg warnx
|
||||
|
||||
#if !defined(ASSERT)
|
||||
# define ASSERT(x) assert((x))
|
||||
#endif
|
|
@ -1,18 +0,0 @@
|
|||
#include <sys/time.h>
|
||||
#include <inttypes.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <stdio.h>
|
||||
|
||||
hrt_abstime hrt_absolute_time()
|
||||
{
|
||||
struct timeval te;
|
||||
gettimeofday(&te, NULL); // get current time
|
||||
hrt_abstime us = static_cast<uint64_t>(te.tv_sec) * 1e6 + te.tv_usec; // caculate us
|
||||
return us;
|
||||
}
|
||||
|
||||
hrt_abstime hrt_elapsed_time(const volatile hrt_abstime *then)
|
||||
{
|
||||
// not thread safe
|
||||
return hrt_absolute_time() - *then;
|
||||
}
|
|
@ -10,8 +10,6 @@ struct param_info_s param_array[256];
|
|||
struct param_info_s *param_info_base;
|
||||
struct param_info_s *param_info_limit;
|
||||
|
||||
#define param_info_count 4
|
||||
|
||||
/*
|
||||
* Adds test parameters
|
||||
*/
|
||||
|
|
|
@ -1,129 +0,0 @@
|
|||
/************************************************************************
|
||||
* include/queue.h
|
||||
*
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* 3. Neither the name NuttX nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
************************************************************************/
|
||||
|
||||
#ifndef __INCLUDE_QUEUE_H
|
||||
#define __INCLUDE_QUEUE_H
|
||||
|
||||
#ifndef FAR
|
||||
#define FAR
|
||||
#endif
|
||||
|
||||
/************************************************************************
|
||||
* Included Files
|
||||
************************************************************************/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
/************************************************************************
|
||||
* Pre-processor Definitions
|
||||
************************************************************************/
|
||||
|
||||
#define sq_init(q) do { (q)->head = NULL; (q)->tail = NULL; } while (0)
|
||||
#define dq_init(q) do { (q)->head = NULL; (q)->tail = NULL; } while (0)
|
||||
|
||||
#define sq_next(p) ((p)->flink)
|
||||
#define dq_next(p) ((p)->flink)
|
||||
#define dq_prev(p) ((p)->blink)
|
||||
|
||||
#define sq_empty(q) ((q)->head == NULL)
|
||||
#define dq_empty(q) ((q)->head == NULL)
|
||||
|
||||
#define sq_peek(q) ((q)->head)
|
||||
#define dq_peek(q) ((q)->head)
|
||||
|
||||
/************************************************************************
|
||||
* Global Type Declarations
|
||||
************************************************************************/
|
||||
|
||||
struct sq_entry_s {
|
||||
FAR struct sq_entry_s *flink;
|
||||
};
|
||||
typedef struct sq_entry_s sq_entry_t;
|
||||
|
||||
struct dq_entry_s {
|
||||
FAR struct dq_entry_s *flink;
|
||||
FAR struct dq_entry_s *blink;
|
||||
};
|
||||
typedef struct dq_entry_s dq_entry_t;
|
||||
|
||||
struct sq_queue_s {
|
||||
FAR sq_entry_t *head;
|
||||
FAR sq_entry_t *tail;
|
||||
};
|
||||
typedef struct sq_queue_s sq_queue_t;
|
||||
|
||||
struct dq_queue_s {
|
||||
FAR dq_entry_t *head;
|
||||
FAR dq_entry_t *tail;
|
||||
};
|
||||
typedef struct dq_queue_s dq_queue_t;
|
||||
|
||||
/************************************************************************
|
||||
* Global Function Prototypes
|
||||
************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define EXTERN extern "C"
|
||||
extern "C" {
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
EXTERN void sq_addfirst(FAR sq_entry_t *node, sq_queue_t *queue);
|
||||
EXTERN void dq_addfirst(FAR dq_entry_t *node, dq_queue_t *queue);
|
||||
EXTERN void sq_addlast(FAR sq_entry_t *node, sq_queue_t *queue);
|
||||
EXTERN void dq_addlast(FAR dq_entry_t *node, dq_queue_t *queue);
|
||||
EXTERN void sq_addafter(FAR sq_entry_t *prev, FAR sq_entry_t *node,
|
||||
sq_queue_t *queue);
|
||||
EXTERN void dq_addafter(FAR dq_entry_t *prev, FAR dq_entry_t *node,
|
||||
dq_queue_t *queue);
|
||||
EXTERN void dq_addbefore(FAR dq_entry_t *next, FAR dq_entry_t *node,
|
||||
dq_queue_t *queue);
|
||||
|
||||
EXTERN FAR sq_entry_t *sq_remafter(FAR sq_entry_t *node, sq_queue_t *queue);
|
||||
EXTERN void sq_rem(FAR sq_entry_t *node, sq_queue_t *queue);
|
||||
EXTERN void dq_rem(FAR dq_entry_t *node, dq_queue_t *queue);
|
||||
EXTERN FAR sq_entry_t *sq_remlast(sq_queue_t *queue);
|
||||
EXTERN FAR dq_entry_t *dq_remlast(dq_queue_t *queue);
|
||||
EXTERN FAR sq_entry_t *sq_remfirst(sq_queue_t *queue);
|
||||
EXTERN FAR dq_entry_t *dq_remfirst(dq_queue_t *queue);
|
||||
|
||||
#undef EXTERN
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INCLUDE_QUEUE_H_ */
|
||||
|
Loading…
Reference in New Issue