mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
Fix the build of mindpx-v2 default
This commit is contained in:
@@ -52,6 +52,7 @@ set(config_module_list
|
|||||||
drivers/pwm_input
|
drivers/pwm_input
|
||||||
drivers/camera_trigger
|
drivers/camera_trigger
|
||||||
drivers/bst
|
drivers/bst
|
||||||
|
drivers/snapdragon_rc_pwm
|
||||||
|
|
||||||
#
|
#
|
||||||
# System commands
|
# System commands
|
||||||
@@ -118,7 +119,6 @@ set(config_module_list
|
|||||||
#
|
#
|
||||||
# Libraries
|
# Libraries
|
||||||
#
|
#
|
||||||
#lib/mathlib/CMSIS
|
|
||||||
lib/mathlib
|
lib/mathlib
|
||||||
lib/mathlib/math/filter
|
lib/mathlib/math/filter
|
||||||
lib/ecl
|
lib/ecl
|
||||||
@@ -152,7 +152,7 @@ set(config_module_list
|
|||||||
#examples/math_demo
|
#examples/math_demo
|
||||||
# Tutorial code from
|
# Tutorial code from
|
||||||
# https://px4.io/dev/px4_simple_app
|
# https://px4.io/dev/px4_simple_app
|
||||||
#examples/px4_simple_app
|
examples/px4_simple_app
|
||||||
|
|
||||||
# Tutorial code from
|
# Tutorial code from
|
||||||
# https://px4.io/dev/daemon
|
# https://px4.io/dev/daemon
|
||||||
@@ -180,13 +180,11 @@ set(config_io_board
|
|||||||
)
|
)
|
||||||
|
|
||||||
set(config_extra_libs
|
set(config_extra_libs
|
||||||
${CMAKE_SOURCE_DIR}/src/lib/mathlib/CMSIS/libarm_cortexM4lf_math.a
|
|
||||||
uavcan
|
uavcan
|
||||||
uavcan_stm32_driver
|
uavcan_stm32_driver
|
||||||
)
|
)
|
||||||
|
|
||||||
set(config_io_extra_libs
|
set(config_io_extra_libs
|
||||||
#${CMAKE_SOURCE_DIR}/src/lib/mathlib/CMSIS/libarm_cortexM3l_math.a
|
|
||||||
)
|
)
|
||||||
|
|
||||||
add_custom_target(sercon)
|
add_custom_target(sercon)
|
||||||
|
|||||||
@@ -243,7 +243,7 @@ private:
|
|||||||
|
|
||||||
ringbuffer::RingBuffer *_accel_reports;
|
ringbuffer::RingBuffer *_accel_reports;
|
||||||
|
|
||||||
struct accel_scale _accel_scale;
|
struct accel_calibration_s _accel_scale;
|
||||||
float _accel_range_scale;
|
float _accel_range_scale;
|
||||||
float _accel_range_m_s2;
|
float _accel_range_m_s2;
|
||||||
orb_advert_t _accel_topic;
|
orb_advert_t _accel_topic;
|
||||||
@@ -252,7 +252,7 @@ private:
|
|||||||
|
|
||||||
ringbuffer::RingBuffer *_gyro_reports;
|
ringbuffer::RingBuffer *_gyro_reports;
|
||||||
|
|
||||||
struct gyro_scale _gyro_scale;
|
struct gyro_calibration_s _gyro_scale;
|
||||||
float _gyro_range_scale;
|
float _gyro_range_scale;
|
||||||
float _gyro_range_rad_s;
|
float _gyro_range_rad_s;
|
||||||
|
|
||||||
@@ -1328,7 +1328,7 @@ MPU6500::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||||||
|
|
||||||
case ACCELIOCSSCALE: {
|
case ACCELIOCSSCALE: {
|
||||||
/* copy scale, but only if off by a few percent */
|
/* copy scale, but only if off by a few percent */
|
||||||
struct accel_scale *s = (struct accel_scale *) arg;
|
struct accel_calibration_s *s = (struct accel_calibration_s *) arg;
|
||||||
float sum = s->x_scale + s->y_scale + s->z_scale;
|
float sum = s->x_scale + s->y_scale + s->z_scale;
|
||||||
|
|
||||||
if (sum > 2.0f && sum < 4.0f) {
|
if (sum > 2.0f && sum < 4.0f) {
|
||||||
@@ -1342,7 +1342,7 @@ MPU6500::ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||||||
|
|
||||||
case ACCELIOCGSCALE:
|
case ACCELIOCGSCALE:
|
||||||
/* copy scale out */
|
/* copy scale out */
|
||||||
memcpy((struct accel_scale *) arg, &_accel_scale, sizeof(_accel_scale));
|
memcpy((struct accel_calibration_s *) arg, &_accel_scale, sizeof(_accel_scale));
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
case ACCELIOCSRANGE:
|
case ACCELIOCSRANGE:
|
||||||
@@ -1412,12 +1412,12 @@ MPU6500::gyro_ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||||||
|
|
||||||
case GYROIOCSSCALE:
|
case GYROIOCSSCALE:
|
||||||
/* copy scale in */
|
/* copy scale in */
|
||||||
memcpy(&_gyro_scale, (struct gyro_scale *) arg, sizeof(_gyro_scale));
|
memcpy(&_gyro_scale, (struct gyro_calibration_s *) arg, sizeof(_gyro_scale));
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
case GYROIOCGSCALE:
|
case GYROIOCGSCALE:
|
||||||
/* copy scale out */
|
/* copy scale out */
|
||||||
memcpy((struct gyro_scale *) arg, &_gyro_scale, sizeof(_gyro_scale));
|
memcpy((struct gyro_calibration_s *) arg, &_gyro_scale, sizeof(_gyro_scale));
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
case GYROIOCSRANGE:
|
case GYROIOCSRANGE:
|
||||||
|
|||||||
Reference in New Issue
Block a user