mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 17:58:52 +08:00
Initial Cannode PWM Support (#19748)
* Add uavcannode esc/servo pwm control pipeline * Remove cannode rc.interface with mixer purge * Cannode add Kconfig options to reduce flash usage
This commit is contained in:
@@ -80,6 +80,7 @@ UavcanNode::UavcanNode(uavcan::ICanDriver &can_driver, uavcan::ISystemClock &sys
|
||||
ScheduledWorkItem(MODULE_NAME, px4::wq_configurations::uavcan),
|
||||
ModuleParams(nullptr),
|
||||
_node(can_driver, system_clock, _pool_allocator),
|
||||
_arming_status_controller(_node),
|
||||
_beep_controller(_node),
|
||||
_esc_controller(_node),
|
||||
_servo_controller(_node),
|
||||
@@ -478,7 +479,21 @@ UavcanNode::init(uavcan::NodeID node_id, UAVCAN_DRIVER::BusEvent &bus_events)
|
||||
|
||||
fill_node_info();
|
||||
|
||||
int ret = _beep_controller.init();
|
||||
int ret;
|
||||
|
||||
// UAVCAN_PUB_ARM
|
||||
int32_t uavcan_pub_arm = 0;
|
||||
param_get(param_find("UAVCAN_PUB_ARM"), &uavcan_pub_arm);
|
||||
|
||||
if (uavcan_pub_arm == 1) {
|
||||
ret = _arming_status_controller.init();
|
||||
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ret = _beep_controller.init();
|
||||
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user