From 651ecacf1d5274de837b12eacccad3cf0ad70a44 Mon Sep 17 00:00:00 2001 From: Kristoffer Richardsson Date: Wed, 8 Mar 2023 14:53:08 +0100 Subject: [PATCH 1/5] Refactoring: Moved controllers and estimators to new directories --- Makefile | 10 +++---- bindings/setup.py | 11 +++---- .../{ => controller}/attitude_controller.h | 0 .../interface/{ => controller}/controller.h | 0 .../{ => controller}/controller_brescianini.h | 0 .../{ => controller}/controller_indi.h | 0 .../{ => controller}/controller_mellinger.h | 0 .../{ => controller}/controller_pid.h | 0 .../{ => controller}/position_controller.h | 0 .../position_controller_indi.h | 0 .../interface/{ => estimator}/estimator.h | 0 .../{ => estimator}/estimator_complementary.h | 0 .../{ => estimator}/estimator_kalman.h | 0 .../interface/{ => estimator}/estimator_ukf.h | 0 .../{ => estimator}/position_estimator.h | 0 src/modules/src/Kbuild | 30 ++++--------------- src/modules/src/controller/Kbuild | 8 +++++ .../attitude_pid_controller.c | 0 src/modules/src/{ => controller}/controller.c | 0 .../{ => controller}/controller_brescianini.c | 0 .../src/{ => controller}/controller_indi.c | 0 .../{ => controller}/controller_mellinger.c | 0 .../src/{ => controller}/controller_pid.c | 0 .../position_controller_indi.c | 0 .../position_controller_pid.c | 0 src/modules/src/cpx/Kbuild | 5 ++++ src/modules/src/estimator/Kbuild | 5 ++++ src/modules/src/{ => estimator}/estimator.c | 0 .../{ => estimator}/estimator_complementary.c | 0 .../src/{ => estimator}/estimator_kalman.c | 0 .../src/{ => estimator}/estimator_ukf.c | 0 .../position_estimator_altitude.c | 0 src/modules/src/p2pDTR/Kbuild | 4 +++ tools/test/gcc.yml | 2 ++ 34 files changed, 40 insertions(+), 35 deletions(-) rename src/modules/interface/{ => controller}/attitude_controller.h (100%) rename src/modules/interface/{ => controller}/controller.h (100%) rename src/modules/interface/{ => controller}/controller_brescianini.h (100%) rename src/modules/interface/{ => controller}/controller_indi.h (100%) rename src/modules/interface/{ => controller}/controller_mellinger.h (100%) rename src/modules/interface/{ => controller}/controller_pid.h (100%) rename src/modules/interface/{ => controller}/position_controller.h (100%) rename src/modules/interface/{ => controller}/position_controller_indi.h (100%) rename src/modules/interface/{ => estimator}/estimator.h (100%) rename src/modules/interface/{ => estimator}/estimator_complementary.h (100%) rename src/modules/interface/{ => estimator}/estimator_kalman.h (100%) rename src/modules/interface/{ => estimator}/estimator_ukf.h (100%) rename src/modules/interface/{ => estimator}/position_estimator.h (100%) create mode 100644 src/modules/src/controller/Kbuild rename src/modules/src/{ => controller}/attitude_pid_controller.c (100%) rename src/modules/src/{ => controller}/controller.c (100%) rename src/modules/src/{ => controller}/controller_brescianini.c (100%) rename src/modules/src/{ => controller}/controller_indi.c (100%) rename src/modules/src/{ => controller}/controller_mellinger.c (100%) rename src/modules/src/{ => controller}/controller_pid.c (100%) rename src/modules/src/{ => controller}/position_controller_indi.c (100%) rename src/modules/src/{ => controller}/position_controller_pid.c (100%) create mode 100644 src/modules/src/cpx/Kbuild create mode 100644 src/modules/src/estimator/Kbuild rename src/modules/src/{ => estimator}/estimator.c (100%) rename src/modules/src/{ => estimator}/estimator_complementary.c (100%) rename src/modules/src/{ => estimator}/estimator_kalman.c (100%) rename src/modules/src/{ => estimator}/estimator_ukf.c (100%) rename src/modules/src/{ => estimator}/position_estimator_altitude.c (100%) create mode 100644 src/modules/src/p2pDTR/Kbuild diff --git a/Makefile b/Makefile index 72fb9f4ea0..4c88258fbb 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,8 @@ INCLUDES += -I$(srctree)/src/deck/interface -I$(srctree)/src/deck/drivers/interf INCLUDES += -I$(srctree)/src/drivers/interface -I$(srctree)/src/drivers/bosch/interface INCLUDES += -I$(srctree)/src/drivers/esp32/interface INCLUDES += -I$(srctree)/src/hal/interface -INCLUDES += -I$(srctree)/src/modules/interface -I$(srctree)/src/modules/interface/kalman_core -I$(srctree)/src/modules/interface/lighthouse -I$(srctree)/src/modules/interface/cpx -I$(srctree)/src/modules/interface/p2pDTR +INCLUDES += -I$(srctree)/src/modules/interface -I$(srctree)/src/modules/interface/kalman_core -I$(srctree)/src/modules/interface/lighthouse +INCLUDES += -I$(srctree)/src/modules/interface/cpx -I$(srctree)/src/modules/interface/p2pDTR -I$(srctree)/src/modules/interface/controller -I$(srctree)/src/modules/interface/estimator INCLUDES += -I$(srctree)/src/utils/interface -I$(srctree)/src/utils/interface/kve -I$(srctree)/src/utils/interface/lighthouse -I$(srctree)/src/utils/interface/tdoa INCLUDES += -I$(LIB)/FatFS INCLUDES += -I$(LIB)/CMSIS/STM32F4xx/Include @@ -169,12 +170,12 @@ flash_verify: #sends a usb message to the CF to place it in DFU mode, then updates firmware over usb flash_dfu: $(PYTHON) $(srctree)/tools/make/usb-bootloader.py - $(DFU_UTIL) -d 0483:df11 -a 0 -s 0x08004000:leave -D $(PROG).bin + $(DFU_UTIL) -d 0483:df11 -a 0 -s 0x08004000:leave -D $(PROG).bin #uses the dfu utility to flash the firmware at 0x08004000, just after the bootloader #call this target directly if CF cannont be flashed automatically through flash_dfu flash_dfu_manual: - $(DFU_UTIL) -d 0483:df11 -a 0 -s 0x08004000:leave -D $(PROG).bin + $(DFU_UTIL) -d 0483:df11 -a 0 -s 0x08004000:leave -D $(PROG).bin #STM utility targets halt: @@ -216,7 +217,7 @@ MOD_INC = src/modules/interface MOD_SRC = src/modules/src bindings_python build/cffirmware.py: bindings/setup.py $(MOD_SRC)/*.c - swig -python -I$(MOD_INC) -Isrc/hal/interface -Isrc/utils/interface -o build/cffirmware_wrap.c bindings/cffirmware.i + swig -python -I$(MOD_INC) -Isrc/hal/interface -Isrc/utils/interface -Isrc/modules/interface/controller -o build/cffirmware_wrap.c bindings/cffirmware.i $(PYTHON) bindings/setup.py build_ext --inplace test_python: build/cffirmware.py @@ -227,4 +228,3 @@ python_wheel: build/cffirmware.py endif .PHONY: all clean build compile unit prep erase flash check_submodules trace openocd gdb halt reset flash_dfu flash_dfu_manual flash_verify cload size print_version clean_version bindings_python test_python python_wheel - diff --git a/bindings/setup.py b/bindings/setup.py index 11139c31ee..4d48e6627f 100644 --- a/bindings/setup.py +++ b/bindings/setup.py @@ -6,6 +6,7 @@ include = [ "src/modules/interface", + "src/modules/interface/controller", "src/hal/interface", "src/utils/interface/lighthouse", "src/utils/interface", @@ -33,14 +34,14 @@ "src/modules/src/pptraj_compressed.c", "src/modules/src/planner.c", "src/modules/src/collision_avoidance.c", - "src/modules/src/controller_pid.c", - "src/modules/src/position_controller_pid.c", - "src/modules/src/attitude_pid_controller.c", + "src/modules/src/controller/controller_pid.c", + "src/modules/src/controller/position_controller_pid.c", + "src/modules/src/controller/attitude_pid_controller.c", + "src/modules/src/controller/controller_mellinger.c", + "src/modules/src/controller/controller_brescianini.c", "src/modules/src/pid.c", "src/utils/src/filter.c", "src/utils/src/num.c", - "src/modules/src/controller_mellinger.c", - "src/modules/src/controller_brescianini.c", "src/modules/src/power_distribution_quadrotor.c", # "src/modules/src/power_distribution_flapper.c", ] diff --git a/src/modules/interface/attitude_controller.h b/src/modules/interface/controller/attitude_controller.h similarity index 100% rename from src/modules/interface/attitude_controller.h rename to src/modules/interface/controller/attitude_controller.h diff --git a/src/modules/interface/controller.h b/src/modules/interface/controller/controller.h similarity index 100% rename from src/modules/interface/controller.h rename to src/modules/interface/controller/controller.h diff --git a/src/modules/interface/controller_brescianini.h b/src/modules/interface/controller/controller_brescianini.h similarity index 100% rename from src/modules/interface/controller_brescianini.h rename to src/modules/interface/controller/controller_brescianini.h diff --git a/src/modules/interface/controller_indi.h b/src/modules/interface/controller/controller_indi.h similarity index 100% rename from src/modules/interface/controller_indi.h rename to src/modules/interface/controller/controller_indi.h diff --git a/src/modules/interface/controller_mellinger.h b/src/modules/interface/controller/controller_mellinger.h similarity index 100% rename from src/modules/interface/controller_mellinger.h rename to src/modules/interface/controller/controller_mellinger.h diff --git a/src/modules/interface/controller_pid.h b/src/modules/interface/controller/controller_pid.h similarity index 100% rename from src/modules/interface/controller_pid.h rename to src/modules/interface/controller/controller_pid.h diff --git a/src/modules/interface/position_controller.h b/src/modules/interface/controller/position_controller.h similarity index 100% rename from src/modules/interface/position_controller.h rename to src/modules/interface/controller/position_controller.h diff --git a/src/modules/interface/position_controller_indi.h b/src/modules/interface/controller/position_controller_indi.h similarity index 100% rename from src/modules/interface/position_controller_indi.h rename to src/modules/interface/controller/position_controller_indi.h diff --git a/src/modules/interface/estimator.h b/src/modules/interface/estimator/estimator.h similarity index 100% rename from src/modules/interface/estimator.h rename to src/modules/interface/estimator/estimator.h diff --git a/src/modules/interface/estimator_complementary.h b/src/modules/interface/estimator/estimator_complementary.h similarity index 100% rename from src/modules/interface/estimator_complementary.h rename to src/modules/interface/estimator/estimator_complementary.h diff --git a/src/modules/interface/estimator_kalman.h b/src/modules/interface/estimator/estimator_kalman.h similarity index 100% rename from src/modules/interface/estimator_kalman.h rename to src/modules/interface/estimator/estimator_kalman.h diff --git a/src/modules/interface/estimator_ukf.h b/src/modules/interface/estimator/estimator_ukf.h similarity index 100% rename from src/modules/interface/estimator_ukf.h rename to src/modules/interface/estimator/estimator_ukf.h diff --git a/src/modules/interface/position_estimator.h b/src/modules/interface/estimator/position_estimator.h similarity index 100% rename from src/modules/interface/position_estimator.h rename to src/modules/interface/estimator/position_estimator.h diff --git a/src/modules/src/Kbuild b/src/modules/src/Kbuild index 131e666e0e..c218b207a6 100644 --- a/src/modules/src/Kbuild +++ b/src/modules/src/Kbuild @@ -1,17 +1,11 @@ obj-y += app_channel.o obj-$(CONFIG_APP_ENABLE) += app_handler.o obj-y += bootloader.o -obj-y += attitude_pid_controller.o obj-y += collision_avoidance.o obj-y += collision_avoidance.o obj-y += commander.o obj-y += comm.o obj-y += console.o -obj-y += controller_indi.o -obj-y += controller_mellinger.o -obj-y += controller.o -obj-y += controller_pid.o -obj-y += controller_brescianini.o obj-y += crtp_commander_generic.o obj-y += crtp_commander_high_level.o obj-y += crtp_commander.o @@ -20,10 +14,6 @@ obj-y += crtp_localization_service.o obj-y += crtp.o obj-y += crtpservice.o obj-y += esp_deck_flasher.o -obj-y += estimator_complementary.o -obj-$(CONFIG_ESTIMATOR_KALMAN_ENABLE) += estimator_kalman.o -obj-$(CONFIG_ESTIMATOR_UKF_ENABLE) += estimator_ukf.o -obj-y += estimator.o obj-y += eventtrigger.o obj-y += extrx.o obj-y += health.o @@ -38,9 +28,6 @@ obj-y += peer_localization.o obj-y += pid.o obj-y += planner.o obj-y += platformservice.o -obj-y += position_controller_indi.o -obj-y += position_controller_pid.o -obj-y += position_estimator_altitude.o obj-$(CONFIG_POWER_DISTRIBUTION_QUADROTOR) += power_distribution_quadrotor.o obj-$(CONFIG_POWER_DISTRIBUTION_FLAPPER) += power_distribution_flapper.o obj-y += pptraj_compressed.o @@ -59,18 +46,11 @@ obj-y += system.o obj-$(CONFIG_DECK_LOCO) += tdoaEngineInstance.o obj-y += vcp_esc_passthrough.o obj-y += worker.o -obj-$(CONFIG_ENABLE_CPX) += cpx/cpx_external_router.o -obj-$(CONFIG_ENABLE_CPX) += cpx/cpx_internal_router.o -obj-$(CONFIG_ENABLE_CPX_ON_UART2) += cpx/cpx_uart_transport.o -obj-$(CONFIG_ENABLE_CPX) += cpx/cpxlink.o -obj-$(CONFIG_ENABLE_CPX) += cpx/cpx.o -obj-y += p2pDTR/DTR_handlers.o -obj-y += p2pDTR/DTR_p2p_interface.o -obj-y += p2pDTR/queueing.o -obj-y += p2pDTR/token_ring.o -# Kalman core +# Sub folders obj-$(CONFIG_ESTIMATOR_KALMAN_ENABLE) += kalman_core/ - -# Lighthouse obj-y += lighthouse/ +obj-y += controller/ +obj-y += estimator/ +obj-y += cpx/ +obj-y += p2pDTR/ diff --git a/src/modules/src/controller/Kbuild b/src/modules/src/controller/Kbuild new file mode 100644 index 0000000000..8aebac4e89 --- /dev/null +++ b/src/modules/src/controller/Kbuild @@ -0,0 +1,8 @@ +obj-y += attitude_pid_controller.o +obj-y += controller_indi.o +obj-y += controller_mellinger.o +obj-y += controller.o +obj-y += controller_pid.o +obj-y += controller_brescianini.o +obj-y += position_controller_indi.o +obj-y += position_controller_pid.o diff --git a/src/modules/src/attitude_pid_controller.c b/src/modules/src/controller/attitude_pid_controller.c similarity index 100% rename from src/modules/src/attitude_pid_controller.c rename to src/modules/src/controller/attitude_pid_controller.c diff --git a/src/modules/src/controller.c b/src/modules/src/controller/controller.c similarity index 100% rename from src/modules/src/controller.c rename to src/modules/src/controller/controller.c diff --git a/src/modules/src/controller_brescianini.c b/src/modules/src/controller/controller_brescianini.c similarity index 100% rename from src/modules/src/controller_brescianini.c rename to src/modules/src/controller/controller_brescianini.c diff --git a/src/modules/src/controller_indi.c b/src/modules/src/controller/controller_indi.c similarity index 100% rename from src/modules/src/controller_indi.c rename to src/modules/src/controller/controller_indi.c diff --git a/src/modules/src/controller_mellinger.c b/src/modules/src/controller/controller_mellinger.c similarity index 100% rename from src/modules/src/controller_mellinger.c rename to src/modules/src/controller/controller_mellinger.c diff --git a/src/modules/src/controller_pid.c b/src/modules/src/controller/controller_pid.c similarity index 100% rename from src/modules/src/controller_pid.c rename to src/modules/src/controller/controller_pid.c diff --git a/src/modules/src/position_controller_indi.c b/src/modules/src/controller/position_controller_indi.c similarity index 100% rename from src/modules/src/position_controller_indi.c rename to src/modules/src/controller/position_controller_indi.c diff --git a/src/modules/src/position_controller_pid.c b/src/modules/src/controller/position_controller_pid.c similarity index 100% rename from src/modules/src/position_controller_pid.c rename to src/modules/src/controller/position_controller_pid.c diff --git a/src/modules/src/cpx/Kbuild b/src/modules/src/cpx/Kbuild new file mode 100644 index 0000000000..fe6c33372f --- /dev/null +++ b/src/modules/src/cpx/Kbuild @@ -0,0 +1,5 @@ +obj-$(CONFIG_ENABLE_CPX) += cpx_external_router.o +obj-$(CONFIG_ENABLE_CPX) += cpx_internal_router.o +obj-$(CONFIG_ENABLE_CPX_ON_UART2) += cpx_uart_transport.o +obj-$(CONFIG_ENABLE_CPX) += cpxlink.o +obj-$(CONFIG_ENABLE_CPX) += cpx.o diff --git a/src/modules/src/estimator/Kbuild b/src/modules/src/estimator/Kbuild new file mode 100644 index 0000000000..604ca5eb1e --- /dev/null +++ b/src/modules/src/estimator/Kbuild @@ -0,0 +1,5 @@ +obj-y += estimator_complementary.o +obj-$(CONFIG_ESTIMATOR_KALMAN_ENABLE) += estimator_kalman.o +obj-$(CONFIG_ESTIMATOR_UKF_ENABLE) += estimator_ukf.o +obj-y += estimator.o +obj-y += position_estimator_altitude.o diff --git a/src/modules/src/estimator.c b/src/modules/src/estimator/estimator.c similarity index 100% rename from src/modules/src/estimator.c rename to src/modules/src/estimator/estimator.c diff --git a/src/modules/src/estimator_complementary.c b/src/modules/src/estimator/estimator_complementary.c similarity index 100% rename from src/modules/src/estimator_complementary.c rename to src/modules/src/estimator/estimator_complementary.c diff --git a/src/modules/src/estimator_kalman.c b/src/modules/src/estimator/estimator_kalman.c similarity index 100% rename from src/modules/src/estimator_kalman.c rename to src/modules/src/estimator/estimator_kalman.c diff --git a/src/modules/src/estimator_ukf.c b/src/modules/src/estimator/estimator_ukf.c similarity index 100% rename from src/modules/src/estimator_ukf.c rename to src/modules/src/estimator/estimator_ukf.c diff --git a/src/modules/src/position_estimator_altitude.c b/src/modules/src/estimator/position_estimator_altitude.c similarity index 100% rename from src/modules/src/position_estimator_altitude.c rename to src/modules/src/estimator/position_estimator_altitude.c diff --git a/src/modules/src/p2pDTR/Kbuild b/src/modules/src/p2pDTR/Kbuild new file mode 100644 index 0000000000..2137401196 --- /dev/null +++ b/src/modules/src/p2pDTR/Kbuild @@ -0,0 +1,4 @@ +obj-y += DTR_handlers.o +obj-y += DTR_p2p_interface.o +obj-y += queueing.o +obj-y += token_ring.o diff --git a/tools/test/gcc.yml b/tools/test/gcc.yml index 0bcb9898b8..e005ddc32b 100644 --- a/tools/test/gcc.yml +++ b/tools/test/gcc.yml @@ -50,6 +50,8 @@ compiler: - 'src/modules/interface/' - 'src/modules/interface/kalman_core/' - 'src/modules/interface/lighthouse/' + - 'src/modules/interface/estimator/' + - 'src/modules/interface/controller/' - 'src/modules/src/' - 'src/modules/src/kalman_core/' - 'src/modules/src/lighthouse/' From 4a20ae9f5782e85a23fed23ea3a383a2cd533e33 Mon Sep 17 00:00:00 2001 From: Kristoffer Richardsson Date: Wed, 8 Mar 2023 15:02:48 +0100 Subject: [PATCH 2/5] Refactoring: Moved PID to utils --- src/modules/src/Kbuild | 1 - src/{modules => utils}/interface/pid.h | 0 src/utils/src/Kbuild | 5 ++--- src/{modules => utils}/src/pid.c | 0 4 files changed, 2 insertions(+), 4 deletions(-) rename src/{modules => utils}/interface/pid.h (100%) rename src/{modules => utils}/src/pid.c (100%) diff --git a/src/modules/src/Kbuild b/src/modules/src/Kbuild index c218b207a6..189433552d 100644 --- a/src/modules/src/Kbuild +++ b/src/modules/src/Kbuild @@ -25,7 +25,6 @@ obj-y += msp.o obj-y += param_logic.o obj-y += param_task.o obj-y += peer_localization.o -obj-y += pid.o obj-y += planner.o obj-y += platformservice.o obj-$(CONFIG_POWER_DISTRIBUTION_QUADROTOR) += power_distribution_quadrotor.o diff --git a/src/modules/interface/pid.h b/src/utils/interface/pid.h similarity index 100% rename from src/modules/interface/pid.h rename to src/utils/interface/pid.h diff --git a/src/utils/src/Kbuild b/src/utils/src/Kbuild index de73792c80..7d88358918 100644 --- a/src/utils/src/Kbuild +++ b/src/utils/src/Kbuild @@ -9,12 +9,11 @@ obj-y += buf2buf.o ### Implementations for abort(), malloc() and free(), needed to interact with apps written in C++ obj-y += abort.o obj-y += malloc.o +obj-y += pid.o -### Add rules for handling generated version.c - +### Rules for handling generated version.c obj-y += version.o version-objs := version_gen.o - src/utils/src/version_gen.c: src/utils/src/version.vtpl FORCE $(PYTHON) $(srctree)/tools/make/versionTemplate.py --crazyflie-base $(srctree) $< $@ diff --git a/src/modules/src/pid.c b/src/utils/src/pid.c similarity index 100% rename from src/modules/src/pid.c rename to src/utils/src/pid.c From c2b4de2f3b2cad33edc00e0a085471009b58e84e Mon Sep 17 00:00:00 2001 From: Kristoffer Richardsson Date: Wed, 8 Mar 2023 15:23:15 +0100 Subject: [PATCH 3/5] Refactoring: cleanup kbuild files --- src/utils/src/Kbuild | 39 +++++++++++++-------------------- src/utils/src/kve/Kbuild | 2 ++ src/utils/src/lighthouse/Kbuild | 6 +++++ src/utils/src/tdoa/Kbuild | 3 +++ 4 files changed, 26 insertions(+), 24 deletions(-) create mode 100644 src/utils/src/kve/Kbuild create mode 100644 src/utils/src/lighthouse/Kbuild create mode 100644 src/utils/src/tdoa/Kbuild diff --git a/src/utils/src/Kbuild b/src/utils/src/Kbuild index 7d88358918..80b6164631 100644 --- a/src/utils/src/Kbuild +++ b/src/utils/src/Kbuild @@ -6,6 +6,21 @@ obj-y += crc32.o obj-y += debug.o obj-y += eprintf.o obj-y += buf2buf.o + +obj-y += filter.o +obj-y += FreeRTOS-openocd.o + +obj-y += num.o +obj-y += rateSupervisor.o +obj-y += sleepus.o +obj-y += statsCnt.o + +### Sub directories +obj-y += kve/ +obj-y += lighthouse/ +obj-y += tdoa/ + + ### Implementations for abort(), malloc() and free(), needed to interact with apps written in C++ obj-y += abort.o obj-y += malloc.o @@ -16,27 +31,3 @@ obj-y += version.o version-objs := version_gen.o src/utils/src/version_gen.c: src/utils/src/version.vtpl FORCE $(PYTHON) $(srctree)/tools/make/versionTemplate.py --crazyflie-base $(srctree) $< $@ - -### - -obj-y += filter.o -obj-y += FreeRTOS-openocd.o -obj-y += kve/kve.o -obj-y += kve/kve_storage.o - -# Lighthouse -obj-$(CONFIG_DECK_LIGHTHOUSE) += lighthouse/lighthouse_calibration.o -obj-$(CONFIG_DECK_LIGHTHOUSE) += lighthouse/lighthouse_geometry.o -obj-$(CONFIG_DECK_LIGHTHOUSE) += lighthouse/ootx_decoder.o -obj-$(CONFIG_DECK_LIGHTHOUSE) += lighthouse/pulse_processor.o -obj-$(CONFIG_DECK_LIGHTHOUSE) += lighthouse/pulse_processor_v1.o -obj-$(CONFIG_DECK_LIGHTHOUSE) += lighthouse/pulse_processor_v2.o -obj-y += num.o -obj-y += rateSupervisor.o -obj-y += sleepus.o -obj-y += statsCnt.o - -# TDoA -obj-$(CONFIG_DECK_LOCO) += tdoa/tdoaEngine.o -obj-$(CONFIG_DECK_LOCO) += tdoa/tdoaStats.o -obj-$(CONFIG_DECK_LOCO) += tdoa/tdoaStorage.o diff --git a/src/utils/src/kve/Kbuild b/src/utils/src/kve/Kbuild new file mode 100644 index 0000000000..aab9287fce --- /dev/null +++ b/src/utils/src/kve/Kbuild @@ -0,0 +1,2 @@ +obj-y += kve.o +obj-y += kve_storage.o diff --git a/src/utils/src/lighthouse/Kbuild b/src/utils/src/lighthouse/Kbuild new file mode 100644 index 0000000000..619f57e913 --- /dev/null +++ b/src/utils/src/lighthouse/Kbuild @@ -0,0 +1,6 @@ +obj-$(CONFIG_DECK_LIGHTHOUSE) += lighthouse_calibration.o +obj-$(CONFIG_DECK_LIGHTHOUSE) += lighthouse_geometry.o +obj-$(CONFIG_DECK_LIGHTHOUSE) += ootx_decoder.o +obj-$(CONFIG_DECK_LIGHTHOUSE) += pulse_processor.o +obj-$(CONFIG_DECK_LIGHTHOUSE) += pulse_processor_v1.o +obj-$(CONFIG_DECK_LIGHTHOUSE) += pulse_processor_v2.o diff --git a/src/utils/src/tdoa/Kbuild b/src/utils/src/tdoa/Kbuild new file mode 100644 index 0000000000..5a4857ed0f --- /dev/null +++ b/src/utils/src/tdoa/Kbuild @@ -0,0 +1,3 @@ +obj-$(CONFIG_DECK_LOCO) += tdoaEngine.o +obj-$(CONFIG_DECK_LOCO) += tdoaStats.o +obj-$(CONFIG_DECK_LOCO) += tdoaStorage.o From 43f0e2e1502c8d8e9fc7aaf3fcf6c20eb97bff04 Mon Sep 17 00:00:00 2001 From: Kristoffer Richardsson Date: Wed, 8 Mar 2023 15:27:53 +0100 Subject: [PATCH 4/5] Refactoring: moved outlier filter tests --- .../src/{ => kalman_core}/test_outlier_filter_lighthouse.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename test/modules/src/{ => kalman_core}/test_outlier_filter_lighthouse.c (100%) diff --git a/test/modules/src/test_outlier_filter_lighthouse.c b/test/modules/src/kalman_core/test_outlier_filter_lighthouse.c similarity index 100% rename from test/modules/src/test_outlier_filter_lighthouse.c rename to test/modules/src/kalman_core/test_outlier_filter_lighthouse.c From 9cac44ca703084113d213010b8d3f189e140429a Mon Sep 17 00:00:00 2001 From: Kristoffer Richardsson Date: Fri, 10 Mar 2023 09:09:34 +0100 Subject: [PATCH 5/5] Correct pid.c in py bindings --- bindings/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/setup.py b/bindings/setup.py index 4d48e6627f..c68c7c6acd 100644 --- a/bindings/setup.py +++ b/bindings/setup.py @@ -39,7 +39,7 @@ "src/modules/src/controller/attitude_pid_controller.c", "src/modules/src/controller/controller_mellinger.c", "src/modules/src/controller/controller_brescianini.c", - "src/modules/src/pid.c", + "src/utils/src/pid.c", "src/utils/src/filter.c", "src/utils/src/num.c", "src/modules/src/power_distribution_quadrotor.c",