mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 16:03:33 +08:00
Add more to Voxl2 build and fix associated build errors (#20821)
- Do not pull in PWM parameters when DISABLE_PARAMS_MODULE_SCOPING is TRUE since VOXL2 has no PWM nor any of the required timer_config files that go along with that - Replace non-standard M_PI constants with PX4 defined M_PI_F constants - Include missing header file for function hrt_absolute_time declaration - Add new PX4_SOC_ARCH_ID for the VOXL2 board
This commit is contained in:
@@ -47,7 +47,7 @@ namespace control
|
||||
|
||||
float BlockHighPass::update(float input)
|
||||
{
|
||||
float b = 2 * float(M_PI) * getFCut() * getDt();
|
||||
float b = 2 * M_PI_F * getFCut() * getDt();
|
||||
float a = 1 / (1 + b);
|
||||
setY(a * (getY() + input - getU()));
|
||||
setU(input);
|
||||
|
||||
@@ -51,7 +51,7 @@ float BlockLowPass::update(float input)
|
||||
setState(input);
|
||||
}
|
||||
|
||||
float b = 2 * float(M_PI) * getFCut() * getDt();
|
||||
float b = 2 * M_PI_F * getFCut() * getDt();
|
||||
float a = b / (1 + b);
|
||||
setState(a * input + (1 - a)*getState());
|
||||
return getState();
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
float b = 2 * float(M_PI) * getFCut() * getDt();
|
||||
float b = 2 * M_PI_F * getFCut() * getDt();
|
||||
float a = b / (1 + b);
|
||||
setState(input * a + getState() * (1 - a));
|
||||
return getState();
|
||||
|
||||
@@ -57,7 +57,14 @@ if(DISABLE_PARAMS_MODULE_SCOPING)
|
||||
${PX4_SOURCE_DIR}/src/*.yaml
|
||||
)
|
||||
foreach(file_path ${yaml_files})
|
||||
list(APPEND module_config_files "${file_path}")
|
||||
# VOXL2 doesn't support PWM and so it has no timer configurations
|
||||
# that are expected when dealing with certain pwm modules. This will
|
||||
# allow those timer configurations to be skipped.
|
||||
if ((${PX4_BOARD_NAME} MATCHES "MODALAI_VOXL2") AND (file_path MATCHES pwm_out))
|
||||
message(STATUS "Skipping pwm file path ${file_path} for VOXL2")
|
||||
else()
|
||||
list(APPEND module_config_files "${file_path}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
list(REMOVE_DUPLICATES module_config_files)
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "DataValidator.hpp"
|
||||
|
||||
#include <px4_platform_common/log.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
|
||||
void DataValidator::put(uint64_t timestamp, float val, uint32_t error_count_in, uint8_t priority_in)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user