Compare commits

...

2 Commits

Author SHA1 Message Date
Daniel Agar f716224c45 uavcan: add UAVCAN_SUB_LOG param to enable/disable uavcan::protocol::debug::LogMessage subscription handling 2022-06-30 10:56:48 -04:00
Ryan Meagher f16ea921c2 drivers/barometer/invensense: fix icp10111 and icp10100
* fix icp so it compiles
* add icp10111 and icp10100 DEVTPYE
2022-06-29 21:22:10 -04:00
9 changed files with 45 additions and 9 deletions
+3
View File
@@ -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
+3
View File
@@ -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 */
+12 -6
View File
@@ -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) {
+12
View File
@@ -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
*