final fix for string output on anchor_relay for core

This commit is contained in:
Tristan McGinnis
2025-02-20 14:31:53 -06:00
parent 251c877083
commit 93a24b6eab

View File

@@ -178,7 +178,9 @@ class SerialRelay(Node):
def send_cmd(self, msg):
if self.launch_mode == 'anchor':
self.get_logger().info(f"[Core to Anchor Relay] {msg}")
self.anchor_pub.publish(msg)
output = String()#Convert to std_msg string
output.data = msg
self.anchor_pub.publish(output)
elif self.launch_mode == 'core':
self.get_logger().info(f"[Core to MCU] {msg}")
self.ser.write(bytes(msg, "utf8"))