mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-31 20:30:04 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f716224c45 | |||
| f16ea921c2 |
@@ -1,13 +0,0 @@
|
||||
# Google C++ style as base
|
||||
Language: Cpp
|
||||
BasedOnStyle: Google
|
||||
|
||||
# Indentation using tabs
|
||||
UseTab: ForContinuationAndIndentation
|
||||
TabWidth: 8
|
||||
IndentWidth: 8
|
||||
ContinuationIndentWidth: 8
|
||||
ConstructorInitializerIndentWidth: 8
|
||||
AccessModifierOffset: -8
|
||||
|
||||
ColumnLimit: 120 # Allow more collumns
|
||||
@@ -375,10 +375,6 @@ format:
|
||||
$(call colorecho,'Formatting with astyle')
|
||||
@"$(SRC_DIR)"/Tools/astyle/check_code_style_all.sh --fix
|
||||
|
||||
format_clang:
|
||||
$(call colorecho,'Formatting with clang-format')
|
||||
@"$(SRC_DIR)"/Tools/astyle/files_to_check_code_style.sh | xargs clang-format -i -style=file
|
||||
|
||||
# Testing
|
||||
# --------------------------------------------------------------------
|
||||
.PHONY: tests tests_coverage tests_mission tests_mission_coverage tests_offboard tests_avoidance
|
||||
|
||||
@@ -8,24 +8,23 @@ if [ $# -gt 0 ]; then
|
||||
fi
|
||||
|
||||
exec find boards msg src platforms test \
|
||||
-not -path "msg/templates/urtps/*" \
|
||||
-not -path "platforms/nuttx/NuttX/*" \
|
||||
-not -path "platforms/qurt/dspal/*" \
|
||||
-not -path "src/drivers/gps/devices/*" \
|
||||
-not -path "src/drivers/uavcan/libuavcan/*" \
|
||||
-not -path "src/drivers/uavcan/uavcan_drivers/kinetis/driver/include/uavcan_kinetis/*" \
|
||||
-not -path "src/drivers/cyphal/libcanard/*" \
|
||||
-not -path "src/lib/crypto/monocypher/*" \
|
||||
-not -path "src/lib/events/libevents/*" \
|
||||
-not -path "src/lib/parameters/uthash/*" \
|
||||
-not -path "src/modules/ekf2/EKF/*" \
|
||||
-not -path "src/modules/gyro_fft/CMSIS_5/*" \
|
||||
-not -path "src/modules/mavlink/mavlink/*" \
|
||||
-not -path "src/modules/micrortps_bridge/micro-CDR/*" \
|
||||
-not -path "src/modules/micrortps_bridge/microRTPS_client/*" \
|
||||
-not -path "test/mavsdk_tests/catch2/*" \
|
||||
-not -path "src/lib/crypto/monocypher/*" \
|
||||
-not -path "src/lib/crypto/libtomcrypt/*" \
|
||||
-not -path "src/lib/crypto/libtommath/*" \
|
||||
-not -path "src/modules/microdds_client/Micro-XRCE-DDS-Client/*" \
|
||||
-path msg/templates/urtps -prune -o \
|
||||
-path platforms/nuttx/NuttX -prune -o \
|
||||
-path platforms/qurt/dspal -prune -o \
|
||||
-path src/drivers/uavcan/libuavcan -prune -o \
|
||||
-path src/drivers/uavcan/uavcan_drivers/kinetis/driver/include/uavcan_kinetis -prune -o \
|
||||
-path src/drivers/cyphal/libcanard -prune -o \
|
||||
-path src/lib/crypto/monocypher -prune -o \
|
||||
-path src/lib/events/libevents -prune -o \
|
||||
-path src/lib/parameters/uthash -prune -o \
|
||||
-path src/modules/ekf2/EKF -prune -o \
|
||||
-path src/modules/gyro_fft/CMSIS_5 -prune -o \
|
||||
-path src/modules/mavlink/mavlink -prune -o \
|
||||
-path src/modules/micrortps_bridge/micro-CDR -prune -o \
|
||||
-path src/modules/micrortps_bridge/microRTPS_client -prune -o \
|
||||
-path test/mavsdk_tests/catch2 -prune -o \
|
||||
-path src/lib/crypto/monocypher -prune -o \
|
||||
-path src/lib/crypto/libtomcrypt -prune -o \
|
||||
-path src/lib/crypto/libtommath -prune -o \
|
||||
-path src/modules/microdds_client/Micro-XRCE-DDS-Client -prune -o \
|
||||
-type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" \) | grep $PATTERN
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
menu "Invensense"
|
||||
rsource "*/Kconfig"
|
||||
endmenu #Invensense
|
||||
@@ -32,7 +32,7 @@
|
||||
############################################################################
|
||||
|
||||
px4_add_module(
|
||||
MODULE drivers__invensense__icp10100
|
||||
MODULE drivers__barometer__invensense__icp10100
|
||||
MAIN icp10100
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
|
||||
@@ -233,7 +233,6 @@ ICP10100::RunImpl()
|
||||
float b = (_pcal[0] - a) * (s1 + c);
|
||||
float _pressure_Pa = a + b / (c + _raw_p);
|
||||
|
||||
const hrt_abstime nowx = hrt_absolute_time();
|
||||
float temperature = _temperature_C;
|
||||
float pressure = _pressure_Pa;
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
menuconfig DRIVERS_BAROMETER_INVENSENSE_ICP10100
|
||||
bool "icp10100"
|
||||
default n
|
||||
---help---
|
||||
Enable support for icp10100
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
############################################################################
|
||||
|
||||
px4_add_module(
|
||||
MODULE drivers__invensense__icp10111
|
||||
MODULE drivers__barometer__invensense__icp10111
|
||||
MAIN icp10111
|
||||
COMPILE_FLAGS
|
||||
SRCS
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
menuconfig DRIVERS_BAROMETER_INVENSENSE_ICP10111
|
||||
bool "icp10100"
|
||||
default n
|
||||
---help---
|
||||
Enable support for icp10111
|
||||
|
||||
@@ -213,6 +213,9 @@
|
||||
#define DRV_FLOW_DEVTYPE_PX4FLOW 0xB5
|
||||
#define DRV_FLOW_DEVTYPE_PAA3905 0xB6
|
||||
|
||||
#define DRV_BARO_DEVTYPE_ICP10100 0xC0
|
||||
#define DRV_BARO_DEVTYPE_ICP10111 0xC1
|
||||
|
||||
#define DRV_DEVTYPE_UNUSED 0xff
|
||||
|
||||
#endif /* _DRV_SENSOR_H */
|
||||
|
||||
@@ -508,6 +508,18 @@ UavcanNode::init(uavcan::NodeID node_id, UAVCAN_DRIVER::BusEvent &bus_events)
|
||||
|
||||
fill_node_info();
|
||||
|
||||
// log message subscription
|
||||
int32_t uavcan_sub_log = 1;
|
||||
param_get(param_find("UAVCAN_SUB_LOG"), &uavcan_sub_log);
|
||||
|
||||
if (uavcan_sub_log != 0) {
|
||||
ret = _log_message_controller.init();
|
||||
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ret = _beep_controller.init();
|
||||
|
||||
if (ret < 0) {
|
||||
@@ -533,12 +545,6 @@ UavcanNode::init(uavcan::NodeID node_id, UAVCAN_DRIVER::BusEvent &bus_events)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = _log_message_controller.init();
|
||||
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = _rgbled_controller.init();
|
||||
|
||||
if (ret < 0) {
|
||||
|
||||
@@ -307,6 +307,18 @@ PARAM_DEFINE_INT32(UAVCAN_SUB_ICE, 0);
|
||||
*/
|
||||
PARAM_DEFINE_INT32(UAVCAN_SUB_IMU, 0);
|
||||
|
||||
/**
|
||||
* subscription log message
|
||||
*
|
||||
* Enable UAVCAN log message subscription.
|
||||
* uavcan::protocol::debug::LogMessage
|
||||
*
|
||||
* @boolean
|
||||
* @reboot_required true
|
||||
* @group UAVCAN
|
||||
*/
|
||||
PARAM_DEFINE_INT32(UAVCAN_SUB_LOG, 1);
|
||||
|
||||
/**
|
||||
* subscription magnetometer
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user