diff --git a/src/drivers/uavcan_v1/ParamManager.hpp b/src/drivers/uavcan_v1/ParamManager.hpp index a4b59407b1..7d30f693fb 100644 --- a/src/drivers/uavcan_v1/ParamManager.hpp +++ b/src/drivers/uavcan_v1/ParamManager.hpp @@ -120,15 +120,15 @@ private: {"uavcan.pub.servo.0.id", "UCAN1_SERVO_PUB", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, {"uavcan.pub.gps.0.id", "UCAN1_GPS_PUB", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, {"uavcan.pub.actuator_outputs.0.id", "UCAN1_ACTR_PUB", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, - {"uavcan.sub.esc.0.id", "UCAN1_ESC0_PID", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, - {"uavcan.sub.gps.0.id", "UCAN1_GPS0_PID", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, - {"uavcan.sub.gps.1.id", "UCAN1_GPS1_PID", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, - {"uavcan.sub.energy_source.0.id", "UCAN1_BMS_ES_PID", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, - {"uavcan.sub.battery_status.0.id", "UCAN1_BMS_BS_PID", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, - {"uavcan.sub.battery_parameters.0.id", "UCAN1_BMS_BP_PID", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, - {"uavcan.sub.legacy_bms.0.id", "UCAN1_LG_BMS_PID", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, + {"uavcan.sub.esc.0.id", "UCAN1_ESC0_SUB", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, + {"uavcan.sub.gps.0.id", "UCAN1_GPS0_SUB", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, + {"uavcan.sub.gps.1.id", "UCAN1_GPS1_SUB", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, + {"uavcan.sub.energy_source.0.id", "UCAN1_BMS_ES_SUB", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, + {"uavcan.sub.battery_status.0.id", "UCAN1_BMS_BS_SUB", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, + {"uavcan.sub.battery_parameters.0.id", "UCAN1_BMS_BP_SUB", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, + {"uavcan.sub.legacy_bms.0.id", "UCAN1_LG_BMS_SUB", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, {"uavcan.sub.uorb.sensor_gps.0.id", "UCAN1_UORB_GPS", px4_param_to_uavcan_port_id, uavcan_port_id_to_px4_param}, - //{"uavcan.sub.bms.0.id", "UCAN1_BMS0_PID"}, //FIXME instancing - //{"uavcan.sub.bms.1.id", "UCAN1_BMS1_PID"}, + //{"uavcan.sub.bms.0.id", "UCAN1_BMS0_SUB"}, //FIXME instancing + //{"uavcan.sub.bms.1.id", "UCAN1_BMS1_SUB"}, }; }; diff --git a/src/drivers/uavcan_v1/SubscriptionManager.hpp b/src/drivers/uavcan_v1/SubscriptionManager.hpp index 6476c2191c..26967866de 100644 --- a/src/drivers/uavcan_v1/SubscriptionManager.hpp +++ b/src/drivers/uavcan_v1/SubscriptionManager.hpp @@ -91,7 +91,7 @@ private: const UavcanDynSubBinder _uavcan_subs[6] { { - "UCAN1_ESC0_PID", + "UCAN1_ESC0_SUB", [](CanardInstance & ins, UavcanParamManager & pmgr) -> UavcanDynamicPortSubscriber * { return new UavcanEscSubscriber(ins, pmgr, 0); @@ -100,7 +100,7 @@ private: 0 }, { - "UCAN1_GPS0_PID", + "UCAN1_GPS0_SUB", [](CanardInstance & ins, UavcanParamManager & pmgr) -> UavcanDynamicPortSubscriber * { return new UavcanGnssSubscriber(ins, pmgr, 0); @@ -109,7 +109,7 @@ private: 0 }, { - "UCAN1_GPS1_PID", + "UCAN1_GPS1_SUB", [](CanardInstance & ins, UavcanParamManager & pmgr) -> UavcanDynamicPortSubscriber * { return new UavcanGnssSubscriber(ins, pmgr, 1); @@ -118,7 +118,7 @@ private: 1 }, { - "UCAN1_BMS_ES_PID", + "UCAN1_BMS_ES_SUB", [](CanardInstance & ins, UavcanParamManager & pmgr) -> UavcanDynamicPortSubscriber * { return new UavcanBmsSubscriber(ins, pmgr, 0); @@ -127,7 +127,7 @@ private: 0 }, { - "UCAN1_LG_BMS_PID", + "UCAN1_LG_BMS_SUB", [](CanardInstance & ins, UavcanParamManager & pmgr) -> UavcanDynamicPortSubscriber * { return new UavcanLegacyBatteryInfoSubscriber(ins, pmgr, 0); diff --git a/src/drivers/uavcan_v1/parameters.c b/src/drivers/uavcan_v1/parameters.c index 0d37cdc7cc..e3274bb49e 100644 --- a/src/drivers/uavcan_v1/parameters.c +++ b/src/drivers/uavcan_v1/parameters.c @@ -69,58 +69,58 @@ PARAM_DEFINE_INT32(UAVCAN_V1_BAUD, 1000000); /* Subscription port ID, -1 will be treated as unset */ /** - * ESC0 port ID. + * ESC 0 subscription port ID. * * @min -1 * @max 6143 * @group UAVCAN v1 */ -PARAM_DEFINE_INT32(UCAN1_ESC0_PID, -1); +PARAM_DEFINE_INT32(UCAN1_ESC0_SUB, -1); /** - * GPS 0 port ID. + * GPS 0 subscription port ID. * * @min -1 * @max 6143 * @group UAVCAN v1 */ -PARAM_DEFINE_INT32(UCAN1_GPS0_PID, -1); +PARAM_DEFINE_INT32(UCAN1_GPS0_SUB, -1); /** - * GPS 1 port ID. + * GPS 1 subscription port ID. * * @min -1 * @max 6143 * @group UAVCAN v1 */ -PARAM_DEFINE_INT32(UCAN1_GPS1_PID, -1); +PARAM_DEFINE_INT32(UCAN1_GPS1_SUB, -1); /** - * DS-015 battery energy source port ID. + * DS-015 battery energy source subscription port ID. * * @min -1 * @max 6143 * @group UAVCAN v1 */ -PARAM_DEFINE_INT32(UCAN1_BMS_ES_PID, -1); +PARAM_DEFINE_INT32(UCAN1_BMS_ES_SUB, -1); /** - * DS-015 battery status port ID. + * DS-015 battery status subscription port ID. * * @min -1 * @max 6143 * @group UAVCAN v1 */ -PARAM_DEFINE_INT32(UCAN1_BMS_BS_PID, -1); +PARAM_DEFINE_INT32(UCAN1_BMS_BS_SUB, -1); /** - * DS-015 battery parameters port ID. + * DS-015 battery parameters subscription port ID. * * @min -1 * @max 6143 * @group UAVCAN v1 */ -PARAM_DEFINE_INT32(UCAN1_BMS_BP_PID, -1); +PARAM_DEFINE_INT32(UCAN1_BMS_BP_SUB, -1); /** * UAVCAN v1 leagcy battery port ID. @@ -129,11 +129,11 @@ PARAM_DEFINE_INT32(UCAN1_BMS_BP_PID, -1); * @max 6143 * @group UAVCAN v1 */ -PARAM_DEFINE_INT32(UCAN1_LG_BMS_PID, -1); +PARAM_DEFINE_INT32(UCAN1_LG_BMS_SUB, -1); /** - * sensor_gps uORB over UAVCAN v1 port ID. + * sensor_gps uORB over UAVCAN v1 subscription port ID. * * @min -1 * @max 6143 @@ -144,7 +144,7 @@ PARAM_DEFINE_INT32(UCAN1_UORB_GPS, -1); // Publication Port IDs /** - * UAVCAN v1 ESC port ID. + * UAVCAN v1 ESC publication port ID. * * @min -1 * @max 6143 @@ -153,7 +153,7 @@ PARAM_DEFINE_INT32(UCAN1_UORB_GPS, -1); PARAM_DEFINE_INT32(UCAN1_ESC_PUB, -1); /** - * UAVCAN v1 GPS port ID. + * UAVCAN v1 GPS publication port ID. * * @min -1 * @max 6143 @@ -162,7 +162,7 @@ PARAM_DEFINE_INT32(UCAN1_ESC_PUB, -1); PARAM_DEFINE_INT32(UCAN1_GPS_PUB, -1); /** - * UAVCAN v1 Servo port ID. + * UAVCAN v1 Servo publication port ID. * * @min -1 * @max 6143 @@ -171,7 +171,7 @@ PARAM_DEFINE_INT32(UCAN1_GPS_PUB, -1); PARAM_DEFINE_INT32(UCAN1_SERVO_PUB, -1); /** - * actuator_outputs uORB over UAVCAN v1 port ID. + * actuator_outputs uORB over UAVCAN v1 publication port ID. * * @min -1 * @max 6143