diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 9292c68182..0e6c4300fb 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -2,12 +2,18 @@ "configurations": [ { "name": "PX4", - "includePath": [ - "${workspaceFolder}/**" - ], - "defines": [], - "macFrameworkPath": [], "configurationProvider": "ms-vscode.cmake-tools", + "compileCommands": "${workspaceFolder}/.vscode/compile_commands.json", + "includePath": [ + ".", + "${workspaceFolder}/platforms/common", + "${workspaceFolder}/platforms/common/include", + "${workspaceFolder}/src", + "${workspaceFolder}/src/include", + "${workspaceFolder}/src/lib", + "${workspaceFolder}/src/lib/matrix", + "${workspaceFolder}/src/modules" + ], "cppStandard": "c++14", "cStandard": "c11" } diff --git a/.vscode/cmake-variants.yaml b/.vscode/cmake-variants.yaml index 9db3e448f4..300dd76dcf 100644 --- a/.vscode/cmake-variants.yaml +++ b/.vscode/cmake-variants.yaml @@ -6,6 +6,16 @@ CONFIG: buildType: RelWithDebInfo settings: CONFIG: px4_sitl_default + px4_sitl_asan: + short: px4_sitl (AddressSanitizer) + buildType: AddressSanitizer + settings: + CONFIG: px4_sitl_default + px4_sitl_ubsan: + short: px4_sitl (UndefinedBehaviorSanitizer) + buildType: UndefinedBehaviorSanitizer + settings: + CONFIG: px4_sitl_default px4_sitl_replay: short: px4_sitl_replay buildType: RelWithDebInfo diff --git a/.vscode/settings.json b/.vscode/settings.json index f8ce7d827b..141fadb0ed 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,7 +5,9 @@ "breadcrumbs.enabled": true, "C_Cpp.autoAddFileAssociations": false, "C_Cpp.clang_format_fallbackStyle": "none", + "C_Cpp.configurationWarnings": "Disabled", "C_Cpp.default.browse.limitSymbolsToIncludedHeaders": true, + "C_Cpp.default.compileCommands": "${workspaceFolder}/.vscode/compile_commands.json", "C_Cpp.default.cppStandard": "c++14", "C_Cpp.default.cStandard": "c11", "C_Cpp.formatting": "Disabled", @@ -16,8 +18,10 @@ "cmake.buildDirectory": "${workspaceFolder}/build/${variant:CONFIG}", "cmake.buildTask": true, "cmake.configureOnOpen": true, + "cmake.copyCompileCommands": "${workspaceFolder}/.vscode/compile_commands.json", "cmake.ctest.parallelJobs": 1, - "cmake.skipConfigureIfCachePresent": true, + "cmake.ignoreKitEnv": true, + "cmake.skipConfigureIfCachePresent": false, "cmakeExplorer.buildDir": "${workspaceFolder}/build/px4_sitl_test", "cmakeExplorer.parallelJobs": 1, "cmakeExplorer.suiteDelimiter": "-", diff --git a/cmake/px4_add_board.cmake b/cmake/px4_add_board.cmake index d718359f41..307a8b2b24 100644 --- a/cmake/px4_add_board.cmake +++ b/cmake/px4_add_board.cmake @@ -210,7 +210,6 @@ function(px4_add_board) foreach(metadata ${EMBEDDED_METADATA}) if(${metadata} STREQUAL "parameters") list(APPEND romfs_extra_files ${PX4_BINARY_DIR}/params.json.xz) - list(APPEND romfs_extra_dependencies parameters_xml) else() message(FATAL_ERROR "invalid value for EMBEDDED_METADATA: ${metadata}") endif() diff --git a/msg/CMakeLists.txt b/msg/CMakeLists.txt index b66c6e41b5..ef1e62abce 100644 --- a/msg/CMakeLists.txt +++ b/msg/CMakeLists.txt @@ -261,6 +261,18 @@ endif() set(msg_files ${msg_files} PARENT_SCOPE) # Generate uORB headers +execute_process( + COMMAND ${PYTHON_EXECUTABLE} tools/px_generate_uorb_topic_files.py + --headers + -f ${msg_files} + -i ${CMAKE_CURRENT_SOURCE_DIR} + -o ${msg_out_path} + -e templates/uorb + -t ${CMAKE_CURRENT_BINARY_DIR}/tmp/headers + -q + ${added_arguments} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +) add_custom_command(OUTPUT ${uorb_headers} COMMAND ${PYTHON_EXECUTABLE} tools/px_generate_uorb_topic_files.py --headers diff --git a/platforms/nuttx/CMakeLists.txt b/platforms/nuttx/CMakeLists.txt index 93c34ffc80..c966939d1f 100644 --- a/platforms/nuttx/CMakeLists.txt +++ b/platforms/nuttx/CMakeLists.txt @@ -166,7 +166,7 @@ add_custom_command(OUTPUT ${PX4_BINARY_OUTPUT} ) # create .px4 with parameter and airframe metadata -if (TARGET parameters_xml AND TARGET airframes_xml) +if(TARGET airframes_xml) string(REPLACE ".elf" ".px4" fw_package ${PX4_BINARY_DIR}/${FW_NAME}) @@ -182,7 +182,6 @@ if (TARGET parameters_xml AND TARGET airframes_xml) DEPENDS ${PX4_BINARY_DIR}/${PX4_BOARD}.bin airframes_xml - parameters_xml COMMENT "Creating ${fw_package}" WORKING_DIRECTORY ${PX4_BINARY_DIR} ) diff --git a/platforms/nuttx/NuttX/CMakeLists.txt b/platforms/nuttx/NuttX/CMakeLists.txt index 5ae550bb30..76a2aae447 100644 --- a/platforms/nuttx/NuttX/CMakeLists.txt +++ b/platforms/nuttx/NuttX/CMakeLists.txt @@ -202,6 +202,7 @@ else() endif() # context +execute_process(COMMAND make --no-print-directory --quiet pass1dep WORKING_DIRECTORY ${NUTTX_DIR} OUTPUT_QUIET) add_custom_command( OUTPUT ${NUTTX_DIR}/include/nuttx/config.h diff --git a/src/drivers/adc/ads1115/CMakeLists.txt b/src/drivers/adc/ads1115/CMakeLists.txt index d65265709d..6e69594d8d 100644 --- a/src/drivers/adc/ads1115/CMakeLists.txt +++ b/src/drivers/adc/ads1115/CMakeLists.txt @@ -37,5 +37,6 @@ px4_add_module( SRCS ads1115_main.cpp ADS1115.cpp + ADS1115.h DEPENDS - ) \ No newline at end of file + ) diff --git a/src/drivers/barometer/bmp388/CMakeLists.txt b/src/drivers/barometer/bmp388/CMakeLists.txt index 35474254de..6d1c55d003 100644 --- a/src/drivers/barometer/bmp388/CMakeLists.txt +++ b/src/drivers/barometer/bmp388/CMakeLists.txt @@ -35,10 +35,11 @@ px4_add_module( MODULE drivers__barometer__bmp388 MAIN bmp388 SRCS - bmp388_spi.cpp bmp388_i2c.cpp - bmp388.cpp bmp388_main.cpp + bmp388_spi.cpp + bmp388.cpp + bmp388.h DEPENDS drivers_barometer px4_work_queue diff --git a/src/drivers/barometer/dps310/CMakeLists.txt b/src/drivers/barometer/dps310/CMakeLists.txt index 088e56e6b5..55fe5ed350 100644 --- a/src/drivers/barometer/dps310/CMakeLists.txt +++ b/src/drivers/barometer/dps310/CMakeLists.txt @@ -39,6 +39,7 @@ px4_add_module( DPS310_I2C.cpp DPS310_SPI.cpp dps310_main.cpp + Infineon_DPS310_Registers.hpp DEPENDS drivers_barometer px4_work_queue diff --git a/src/drivers/barometer/ms5611/CMakeLists.txt b/src/drivers/barometer/ms5611/CMakeLists.txt index f67fb270d8..6e07aad9b1 100644 --- a/src/drivers/barometer/ms5611/CMakeLists.txt +++ b/src/drivers/barometer/ms5611/CMakeLists.txt @@ -37,11 +37,12 @@ px4_add_module( COMPILE_FLAGS -Wno-cast-align # TODO: fix and enable SRCS - ms5611_spi.cpp ms5611_i2c.cpp + ms5611_spi.cpp ms5611.cpp - ms5611_main.cpp + ms5611.h MS5611.hpp + ms5611_main.cpp DEPENDS cdev drivers__device diff --git a/src/drivers/batt_smbus/CMakeLists.txt b/src/drivers/batt_smbus/CMakeLists.txt index bf60e80af3..db7857357d 100644 --- a/src/drivers/batt_smbus/CMakeLists.txt +++ b/src/drivers/batt_smbus/CMakeLists.txt @@ -36,7 +36,7 @@ px4_add_module( COMPILE_FLAGS SRCS batt_smbus.cpp - + batt_smbus.h DEPENDS drivers__smbus ) diff --git a/src/drivers/camera_capture/CMakeLists.txt b/src/drivers/camera_capture/CMakeLists.txt index 44016de586..82b3011664 100644 --- a/src/drivers/camera_capture/CMakeLists.txt +++ b/src/drivers/camera_capture/CMakeLists.txt @@ -36,5 +36,5 @@ px4_add_module( COMPILE_FLAGS SRCS camera_capture.cpp + camera_capture.hpp ) -# vim: set noet ft=cmake fenc=utf-8 ff=unix : diff --git a/src/drivers/camera_trigger/CMakeLists.txt b/src/drivers/camera_trigger/CMakeLists.txt index 176e223403..fd109770c3 100644 --- a/src/drivers/camera_trigger/CMakeLists.txt +++ b/src/drivers/camera_trigger/CMakeLists.txt @@ -1,6 +1,6 @@ ############################################################################ # -# Copyright (c) 2015-2021 PX4 Development Team. All rights reserved. +# Copyright (c) 2015 PX4 Development Team. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -35,11 +35,14 @@ px4_add_module( MAIN camera_trigger COMPILE_FLAGS SRCS - camera_trigger.cpp interfaces/src/camera_interface.cpp - interfaces/src/pwm.cpp - interfaces/src/seagull_map2.cpp + interfaces/src/camera_interface.h interfaces/src/gpio.cpp + interfaces/src/gpio.h + interfaces/src/pwm.cpp + interfaces/src/pwm.h + interfaces/src/seagull_map2.cpp + interfaces/src/seagull_map2.h + camera_trigger.cpp DEPENDS - px4_work_queue - ) +) diff --git a/src/drivers/dshot/CMakeLists.txt b/src/drivers/dshot/CMakeLists.txt index 177629738c..3313520dc3 100644 --- a/src/drivers/dshot/CMakeLists.txt +++ b/src/drivers/dshot/CMakeLists.txt @@ -36,7 +36,9 @@ px4_add_module( STACK_MAIN 1200 SRCS DShot.cpp + DShot.h DShotTelemetry.cpp + DShotTelemetry.h DEPENDS arch_io_pins arch_dshot diff --git a/src/drivers/gps/CMakeLists.txt b/src/drivers/gps/CMakeLists.txt index 065c29e6a6..1fcb0918b6 100644 --- a/src/drivers/gps/CMakeLists.txt +++ b/src/drivers/gps/CMakeLists.txt @@ -40,13 +40,25 @@ px4_add_module( -Wno-cast-align # TODO: fix and enable -Wno-stringop-overflow # due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91707 SRCS - gps.cpp - devices/src/gps_helper.cpp - devices/src/mtk.cpp devices/src/ashtech.cpp - devices/src/ubx.cpp - devices/src/rtcm.cpp + devices/src/ashtech.h + devices/src/base_station.h devices/src/emlid_reach.cpp + devices/src/emlid_reach.h + devices/src/femtomes.cpp + devices/src/femtomes.h + devices/src/gps_helper.cpp + devices/src/gps_helper.h + devices/src/mtk.cpp + devices/src/mtk.h + devices/src/rtcm.cpp + devices/src/rtcm.h + #devices/src/sbf.cpp + #devices/src/sbf.h + devices/src/ubx.cpp + devices/src/ubx.h + definitions.h + gps.cpp MODULE_CONFIG module.yaml DEPENDS diff --git a/src/drivers/gps/devices b/src/drivers/gps/devices index 8ba8d9f19c..e7f0b23f47 160000 --- a/src/drivers/gps/devices +++ b/src/drivers/gps/devices @@ -1 +1 @@ -Subproject commit 8ba8d9f19c2328955424d035d6ce5a08ef11a371 +Subproject commit e7f0b23f47d65490b72e9bacaff191bda2d99496 diff --git a/src/drivers/heater/CMakeLists.txt b/src/drivers/heater/CMakeLists.txt index 6f1fe2e249..595de4470e 100644 --- a/src/drivers/heater/CMakeLists.txt +++ b/src/drivers/heater/CMakeLists.txt @@ -36,4 +36,5 @@ px4_add_module( COMPILE_FLAGS SRCS heater.cpp + heater.h ) diff --git a/src/drivers/optical_flow/paw3902/CMakeLists.txt b/src/drivers/optical_flow/paw3902/CMakeLists.txt index 1683937e5c..9e8dd2ec32 100644 --- a/src/drivers/optical_flow/paw3902/CMakeLists.txt +++ b/src/drivers/optical_flow/paw3902/CMakeLists.txt @@ -37,4 +37,6 @@ px4_add_module( SRCS paw3902_main.cpp PAW3902.cpp + PAW3902.hpp + PixArt_PAW3902JF_Registers.hpp ) diff --git a/src/lib/component_information/CMakeLists.txt b/src/lib/component_information/CMakeLists.txt index 02960e4005..7414e82b62 100644 --- a/src/lib/component_information/CMakeLists.txt +++ b/src/lib/component_information/CMakeLists.txt @@ -60,8 +60,6 @@ add_custom_command(OUTPUT ${component_information_header} --output ${component_information_header} DEPENDS generate_hashes.py - parameters_xml - ${PX4_BINARY_DIR}/params.json.xz ${component_version_json} COMMENT "Generating component_information/hashes.h" ) diff --git a/src/lib/parameters/CMakeLists.txt b/src/lib/parameters/CMakeLists.txt index 55a2cd15ff..5c43a57ec4 100644 --- a/src/lib/parameters/CMakeLists.txt +++ b/src/lib/parameters/CMakeLists.txt @@ -71,30 +71,24 @@ list(REMOVE_DUPLICATES module_list) set(generated_params_dir ${PX4_BINARY_DIR}/generated_params) set(generated_serial_params_file ${generated_params_dir}/serial_params.c) -file(GLOB jinja_templates ${PX4_SOURCE_DIR}/Tools/serial/*.jinja) -if (px4_constrained_flash_build) + +if(px4_constrained_flash_build) set(added_arguments --constrained-flash) endif() -if(PX4_ETHERNET) - set(added_arguments ${added_arguments} --ethernet) -endif() -add_custom_command(OUTPUT ${generated_serial_params_file} + +execute_process( COMMAND ${CMAKE_COMMAND} -E make_directory ${generated_params_dir} +) +execute_process( COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/serial/generate_config.py --params-file ${generated_serial_params_file} --serial-ports ${board_serial_ports} ${added_arguments} --config-files ${module_config_files} #--verbose - DEPENDS - ${module_config_files} - ${jinja_templates} - ${PX4_SOURCE_DIR}/Tools/serial/generate_config.py - COMMENT "Generating serial_params.c" ) set(parameters_xml ${PX4_BINARY_DIR}/parameters.xml) set(parameters_json ${PX4_BINARY_DIR}/params.json) # file name needs to be kept short to fit into url (metadata_uri) -file(GLOB_RECURSE param_src_files ${PX4_SOURCE_DIR}/src/*params.c) -add_custom_command(OUTPUT ${parameters_xml} ${parameters_json} ${parameters_json}.xz +execute_process( COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/px_process_params.py --src-path ${module_list} ${generated_params_dir} --xml ${parameters_xml} @@ -104,29 +98,12 @@ add_custom_command(OUTPUT ${parameters_xml} ${parameters_json} ${parameters_json --overrides ${PARAM_DEFAULT_OVERRIDES} --board ${PX4_BOARD} #--verbose - DEPENDS - ${param_src_files} - ${generated_serial_params_file} - parameters_injected.xml - px4params/srcparser.py - px4params/srcscanner.py - px4params/jsonout.py - px4params/xmlout.py - px_process_params.py - parameters_injected.xml - COMMENT "Generating parameters.xml" ) -add_custom_target(parameters_xml DEPENDS ${parameters_xml}) # generate px4_parameters.hpp -add_custom_command(OUTPUT px4_parameters.hpp - COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/px_generate_params.py - --xml ${parameters_xml} --dest ${CMAKE_CURRENT_BINARY_DIR} - DEPENDS - ${PX4_BINARY_DIR}/parameters.xml - px_generate_params.py - templates/px4_parameters.hpp.jinja - ) +execute_process( + COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/px_generate_params.py --xml ${parameters_xml} --dest ${CMAKE_CURRENT_BINARY_DIR} +) set(SRCS) if ("${CONFIG_SHMEM}" STREQUAL "1") diff --git a/src/modules/airship_att_control/CMakeLists.txt b/src/modules/airship_att_control/CMakeLists.txt index 9771e2ad51..ac458f715d 100644 --- a/src/modules/airship_att_control/CMakeLists.txt +++ b/src/modules/airship_att_control/CMakeLists.txt @@ -38,6 +38,7 @@ px4_add_module( COMPILE_FLAGS SRCS airship_att_control_main.cpp + airship_att_control.hpp DEPENDS px4_work_queue ) diff --git a/src/modules/angular_velocity_controller/AngularVelocityControl/CMakeLists.txt b/src/modules/angular_velocity_controller/AngularVelocityControl/CMakeLists.txt index 05bb7dd7b2..4df4aa9499 100644 --- a/src/modules/angular_velocity_controller/AngularVelocityControl/CMakeLists.txt +++ b/src/modules/angular_velocity_controller/AngularVelocityControl/CMakeLists.txt @@ -33,6 +33,7 @@ px4_add_library(AngularVelocityControl AngularVelocityControl.cpp + AngularVelocityControl.hpp ) target_compile_options(AngularVelocityControl PRIVATE ${MAX_CUSTOM_OPT_LEVEL}) target_include_directories(AngularVelocityControl PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/modules/battery_status/CMakeLists.txt b/src/modules/battery_status/CMakeLists.txt index df7c9967d4..e0c977039f 100644 --- a/src/modules/battery_status/CMakeLists.txt +++ b/src/modules/battery_status/CMakeLists.txt @@ -35,8 +35,9 @@ px4_add_module( MODULE modules__battery_status MAIN battery_status SRCS - battery_status.cpp analog_battery.cpp + analog_battery.h + battery_status.cpp MODULE_CONFIG module.yaml DEPENDS diff --git a/src/modules/commander/CMakeLists.txt b/src/modules/commander/CMakeLists.txt index f9568a0c3b..633555f902 100644 --- a/src/modules/commander/CMakeLists.txt +++ b/src/modules/commander/CMakeLists.txt @@ -40,20 +40,37 @@ px4_add_module( COMPILE_FLAGS SRCS accelerometer_calibration.cpp + accelerometer_calibration.h airspeed_calibration.cpp + airspeed_calibration.h + calibration_messages.h calibration_routines.cpp - Commander.cpp + calibration_routines.h commander_helper.cpp + commander_helper.h + Commander.cpp + Commander.hpp esc_calibration.cpp + esc_calibration.h factory_calibration_storage.cpp + factory_calibration_storage.h gyro_calibration.cpp + gyro_calibration.h level_calibration.cpp + level_calibration.h lm_fit.cpp + lm_fit.hpp mag_calibration.cpp + mag_calibration.h ManualControl.cpp + ManualControl.hpp + px4_custom_mode.h rc_calibration.cpp + rc_calibration.h state_machine_helper.cpp + state_machine_helper.h worker_thread.cpp + worker_thread.hpp DEPENDS circuit_breaker failure_detector diff --git a/src/modules/dataman/CMakeLists.txt b/src/modules/dataman/CMakeLists.txt index 6c0a1ab695..1cc74c002e 100644 --- a/src/modules/dataman/CMakeLists.txt +++ b/src/modules/dataman/CMakeLists.txt @@ -37,4 +37,5 @@ px4_add_module( -Wno-cast-align # TODO: fix and enable SRCS dataman.cpp + dataman.h ) diff --git a/src/modules/ekf2/Utility/CMakeLists.txt b/src/modules/ekf2/Utility/CMakeLists.txt index 7a635acebe..e6533c3bfa 100644 --- a/src/modules/ekf2/Utility/CMakeLists.txt +++ b/src/modules/ekf2/Utility/CMakeLists.txt @@ -32,7 +32,9 @@ ############################################################################# px4_add_library(EKF2Utility + InnovationLpf.hpp PreFlightChecker.cpp + PreFlightChecker.hpp ) target_include_directories(EKF2Utility diff --git a/src/modules/events/CMakeLists.txt b/src/modules/events/CMakeLists.txt index 8c54833d4e..fc12954a9a 100644 --- a/src/modules/events/CMakeLists.txt +++ b/src/modules/events/CMakeLists.txt @@ -37,7 +37,10 @@ px4_add_module( COMPILE_FLAGS SRCS rc_loss_alarm.cpp + rc_loss_alarm.h send_event.cpp + send_event.h set_leds.cpp status_display.cpp + status_display.h ) diff --git a/src/modules/fw_att_control/CMakeLists.txt b/src/modules/fw_att_control/CMakeLists.txt index a8c79cf31c..f58f68bbbc 100644 --- a/src/modules/fw_att_control/CMakeLists.txt +++ b/src/modules/fw_att_control/CMakeLists.txt @@ -34,14 +34,18 @@ px4_add_module( MODULE modules__fw_att_control MAIN fw_att_control SRCS + ecl_controller.cpp + ecl_controller.h + ecl_pitch_controller.cpp + ecl_pitch_controller.h + ecl_roll_controller.cpp + ecl_roll_controller.h + ecl_wheel_controller.cpp + ecl_wheel_controller.h + ecl_yaw_controller.cpp + ecl_yaw_controller.h FixedwingAttitudeControl.cpp FixedwingAttitudeControl.hpp - - ecl_controller.cpp - ecl_pitch_controller.cpp - ecl_roll_controller.cpp - ecl_wheel_controller.cpp - ecl_yaw_controller.cpp DEPENDS px4_work_queue ) diff --git a/src/modules/fw_pos_control_l1/launchdetection/CMakeLists.txt b/src/modules/fw_pos_control_l1/launchdetection/CMakeLists.txt index d7be8b54b2..e7b1ebb513 100644 --- a/src/modules/fw_pos_control_l1/launchdetection/CMakeLists.txt +++ b/src/modules/fw_pos_control_l1/launchdetection/CMakeLists.txt @@ -32,6 +32,9 @@ ############################################################################ px4_add_library(launchdetection - LaunchDetector.cpp CatapultLaunchMethod.cpp -) \ No newline at end of file + CatapultLaunchMethod.h + LaunchDetector.cpp + LaunchDetector.h + LaunchMethod.h +) diff --git a/src/modules/land_detector/CMakeLists.txt b/src/modules/land_detector/CMakeLists.txt index 632c90d5cf..5a76d214d2 100644 --- a/src/modules/land_detector/CMakeLists.txt +++ b/src/modules/land_detector/CMakeLists.txt @@ -35,14 +35,21 @@ px4_add_module( MAIN land_detector COMPILE_FLAGS SRCS + AirshipLandDetector.cpp + AirshipLandDetector.h + FixedwingLandDetector.cpp + FixedwingLandDetector.h land_detector_main.cpp LandDetector.cpp + LandDetector.h MulticopterLandDetector.cpp - FixedwingLandDetector.cpp - VtolLandDetector.cpp + MulticopterLandDetector.h RoverLandDetector.cpp - AirshipLandDetector.cpp + RoverLandDetector.h + VtolLandDetector.cpp + VtolLandDetector.h DEPENDS hysteresis + px4_work_queue ) diff --git a/src/modules/landing_target_estimator/CMakeLists.txt b/src/modules/landing_target_estimator/CMakeLists.txt index 146869aa3f..49ca7bddfb 100644 --- a/src/modules/landing_target_estimator/CMakeLists.txt +++ b/src/modules/landing_target_estimator/CMakeLists.txt @@ -36,9 +36,11 @@ px4_add_module( MAIN landing_target_estimator COMPILE_FLAGS SRCS + KalmanFilter.cpp + KalmanFilter.h landing_target_estimator_main.cpp LandingTargetEstimator.cpp - KalmanFilter.cpp + LandingTargetEstimator.h DEPENDS ) diff --git a/src/modules/local_position_estimator/CMakeLists.txt b/src/modules/local_position_estimator/CMakeLists.txt index a54534e6d0..3cb2a0006c 100644 --- a/src/modules/local_position_estimator/CMakeLists.txt +++ b/src/modules/local_position_estimator/CMakeLists.txt @@ -37,16 +37,17 @@ px4_add_module( STACK_MAIN 5700 STACK_MAX 3700 SRCS - BlockLocalPositionEstimator.cpp - sensors/flow.cpp - sensors/lidar.cpp - sensors/sonar.cpp - sensors/gps.cpp sensors/baro.cpp - sensors/vision.cpp - sensors/mocap.cpp + sensors/flow.cpp + sensors/gps.cpp sensors/land.cpp sensors/landing_target.cpp + sensors/lidar.cpp + sensors/mocap.cpp + sensors/sonar.cpp + sensors/vision.cpp + BlockLocalPositionEstimator.cpp + BlockLocalPositionEstimator.hpp DEPENDS controllib git_ecl diff --git a/src/modules/logger/CMakeLists.txt b/src/modules/logger/CMakeLists.txt index 9d60069745..789dcec51f 100644 --- a/src/modules/logger/CMakeLists.txt +++ b/src/modules/logger/CMakeLists.txt @@ -38,13 +38,21 @@ px4_add_module( COMPILE_FLAGS -Wno-cast-align # TODO: fix and enable SRCS - logged_topics.cpp - logger.cpp - log_writer.cpp log_writer_file.cpp + log_writer_file.h log_writer_mavlink.cpp + log_writer_mavlink.h + log_writer.cpp + log_writer.h + logged_topics.cpp + logged_topics.h + logger.cpp + logger.h + messages.h util.cpp + util.h watchdog.cpp + watchdog.h DEPENDS version ) diff --git a/src/modules/navigator/CMakeLists.txt b/src/modules/navigator/CMakeLists.txt index 4a237ccc5b..b75631e2d9 100644 --- a/src/modules/navigator/CMakeLists.txt +++ b/src/modules/navigator/CMakeLists.txt @@ -37,20 +37,35 @@ px4_add_module( MODULE modules__navigator MAIN navigator SRCS + enginefailure.cpp + enginefailure.h + follow_target.cpp + follow_target.h + geofence.cpp + geofence.h + gpsfailure.cpp + gpsfailure.h + land.cpp + land.h + loiter.cpp + loiter.h + mission_block.cpp + mission_block.h + mission_feasibility_checker.cpp + mission_feasibility_checker.h + mission.cpp + mission.h + navigation.h navigator_main.cpp navigator_mode.cpp - mission_block.cpp - mission.cpp - loiter.cpp - rtl.cpp - takeoff.cpp - land.cpp + navigator_mode.h + navigator.h precland.cpp - mission_feasibility_checker.cpp - geofence.cpp - enginefailure.cpp - gpsfailure.cpp - follow_target.cpp + precland.h + rtl.cpp + rtl.h + takeoff.cpp + takeoff.h DEPENDS git_ecl ecl_geo @@ -59,4 +74,4 @@ px4_add_module( motion_planning ) -px4_add_functional_gtest(SRC RangeRTLTest.cpp LINKLIBS modules__navigator modules__dataman) \ No newline at end of file +px4_add_functional_gtest(SRC RangeRTLTest.cpp LINKLIBS modules__navigator modules__dataman) diff --git a/src/modules/px4iofirmware/CMakeLists.txt b/src/modules/px4iofirmware/CMakeLists.txt index 3b76556342..8c1d6a3f93 100644 --- a/src/modules/px4iofirmware/CMakeLists.txt +++ b/src/modules/px4iofirmware/CMakeLists.txt @@ -37,7 +37,9 @@ add_library(px4iofirmware adc.c controls.c mixer.cpp + protocol.h px4io.c + px4io.h registers.c safety.c serial.c diff --git a/src/modules/sensors/CMakeLists.txt b/src/modules/sensors/CMakeLists.txt index e2f605325a..980f3c83d6 100644 --- a/src/modules/sensors/CMakeLists.txt +++ b/src/modules/sensors/CMakeLists.txt @@ -45,8 +45,9 @@ px4_add_module( MODULE modules__sensors MAIN sensors SRCS - voted_sensors_update.cpp sensors.cpp + voted_sensors_update.cpp + voted_sensors_update.h DEPENDS airspeed conversion diff --git a/src/modules/simulator/CMakeLists.txt b/src/modules/simulator/CMakeLists.txt index fdc6837154..140f0352e5 100644 --- a/src/modules/simulator/CMakeLists.txt +++ b/src/modules/simulator/CMakeLists.txt @@ -47,9 +47,9 @@ endif() configure_file(simulator_config.h.in simulator_config.h @ONLY) include_directories(${CMAKE_CURRENT_BINARY_DIR}) -set(SIMULATOR_SRCS simulator.cpp) +set(SIMULATOR_EXTRA_SRCS) if (NOT ${PX4_PLATFORM} STREQUAL "qurt") - list(APPEND SIMULATOR_SRCS + list(APPEND SIMULATOR_EXTRA_SRCS simulator_mavlink.cpp) endif() @@ -63,7 +63,9 @@ px4_add_module( INCLUDES ${PX4_SOURCE_DIR}/mavlink/include/mavlink SRCS - ${SIMULATOR_SRCS} + ${SIMULATOR_EXTRA_SRCS} + simulator.cpp + simulator.h DEPENDS git_mavlink_v2 conversion diff --git a/src/modules/temperature_compensation/CMakeLists.txt b/src/modules/temperature_compensation/CMakeLists.txt index 50e6a181e0..69d19e3e66 100644 --- a/src/modules/temperature_compensation/CMakeLists.txt +++ b/src/modules/temperature_compensation/CMakeLists.txt @@ -35,12 +35,20 @@ px4_add_module( MODULE modules__temperature_compensation MAIN temperature_compensation SRCS - TemperatureCompensationModule.cpp TemperatureCompensation.cpp + TemperatureCompensation.h + TemperatureCompensationModule.cpp + TemperatureCompensationModule.h temperature_calibration/accel.cpp + temperature_calibration/accel.h temperature_calibration/baro.cpp + temperature_calibration/baro.h + temperature_calibration/common.h temperature_calibration/gyro.cpp + temperature_calibration/gyro.h + temperature_calibration/polyfit.hpp temperature_calibration/task.cpp + temperature_calibration/temperature_calibration.h DEPENDS mathlib ) diff --git a/src/modules/uuv_att_control/CMakeLists.txt b/src/modules/uuv_att_control/CMakeLists.txt index 37dc0d728c..a848223b29 100644 --- a/src/modules/uuv_att_control/CMakeLists.txt +++ b/src/modules/uuv_att_control/CMakeLists.txt @@ -33,8 +33,8 @@ px4_add_module( MODULE modules__uuv_att_control MAIN uuv_att_control - STACK_MAIN 1200 COMPILE_FLAGS SRCS uuv_att_control.cpp + uuv_att_control.hpp ) diff --git a/src/modules/uuv_pos_control/CMakeLists.txt b/src/modules/uuv_pos_control/CMakeLists.txt index f97dd0ea42..d91f3d6ddc 100644 --- a/src/modules/uuv_pos_control/CMakeLists.txt +++ b/src/modules/uuv_pos_control/CMakeLists.txt @@ -33,8 +33,8 @@ px4_add_module( MODULE modules__uuv_pos_control MAIN uuv_pos_control - STACK_MAIN 1200 COMPILE_FLAGS SRCS uuv_pos_control.cpp + uuv_pos_control.hpp ) diff --git a/src/modules/vmount/CMakeLists.txt b/src/modules/vmount/CMakeLists.txt index 069a1cca13..3c565c34a1 100644 --- a/src/modules/vmount/CMakeLists.txt +++ b/src/modules/vmount/CMakeLists.txt @@ -35,16 +35,23 @@ px4_add_module( MAIN vmount COMPILE_FLAGS SRCS - input.cpp + common.h input_mavlink.cpp + input_mavlink.h input_rc.cpp + input_rc.h input_test.cpp - output.cpp + input_test.h + input.cpp + input.h output_mavlink.cpp + output_mavlink.h output_rc.cpp + output_rc.h + output.cpp + output.h vmount.cpp DEPENDS git_ecl ecl_geo ) - diff --git a/src/modules/vtol_att_control/CMakeLists.txt b/src/modules/vtol_att_control/CMakeLists.txt index e6316b1459..7acc562e91 100644 --- a/src/modules/vtol_att_control/CMakeLists.txt +++ b/src/modules/vtol_att_control/CMakeLists.txt @@ -34,10 +34,14 @@ px4_add_module( MODULE modules__vtol_att_control MAIN vtol_att_control SRCS - vtol_att_control_main.cpp - tiltrotor.cpp - vtol_type.cpp - tailsitter.cpp standard.cpp + standard.h + tailsitter.cpp + tailsitter.h + tiltrotor.cpp + tiltrotor.h + vtol_att_control_main.cpp + vtol_att_control_main.h + vtol_type.cpp + vtol_type.h ) -