[uavcan] Param for interface mask of ESC actuators

This commit is contained in:
Niklas Hauser
2025-05-28 15:03:59 +02:00
committed by Niklas Hauser
parent 38bcc50127
commit 62c9bf8a47
2 changed files with 32 additions and 0 deletions
+7
View File
@@ -39,6 +39,7 @@
#include "esc.hpp"
#include <systemlib/err.h>
#include <parameters/param.h>
#include <drivers/drv_hrt.h>
#define MOTOR_BIT(x) (1<<(x))
@@ -66,6 +67,12 @@ UavcanEscController::init()
_esc_status_pub.advertise();
int32_t iface_mask{0xFF};
if (param_get(param_find("UAVCAN_ESC_IFACE"), &iface_mask) == OK) {
_uavcan_pub_raw_cmd.getTransferSender().setIfaceMask(iface_mask);
}
return res;
}