From 8e3f2ee88a6604c40fb59fa93272dac999c6eec2 Mon Sep 17 00:00:00 2001 From: Tristan McGinnis Date: Wed, 16 Apr 2025 20:03:54 -0500 Subject: [PATCH] fix: anchor publishes feedback for respective feedback topics --- src/anchor_pkg/anchor_pkg/anchor_node.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/anchor_pkg/anchor_pkg/anchor_node.py b/src/anchor_pkg/anchor_pkg/anchor_node.py index 575870b..b21da4a 100644 --- a/src/anchor_pkg/anchor_pkg/anchor_node.py +++ b/src/anchor_pkg/anchor_pkg/anchor_node.py @@ -88,7 +88,22 @@ class SerialRelay(Node): if output: # All output over debug temporarily - #self.get_logger().info(f"[MCU] {output}") + self.get_logger().info(f"[MCU] {output}") + if output.startswith("can_relay_fromvic,arm"): + # Publish the message to the arm topic + msg = String() + msg.data = output + self.arm_pub.publish(msg) + elif output.startswith("can_relay_fromvic,core"): + # Publish the message to the core topic + msg = String() + msg.data = output + self.core_pub.publish(msg) + elif output.startswith("can_relay_fromvic,bio"): + # Publish the message to the bio topic + msg = String() + msg.data = output + self.bio_pub.publish(msg) msg = String() msg.data = output if output.startswith("can_relay_fromvic,core"):