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"):