style: move pub/sub docs comment, rename SerialPub to Anchor

This commit is contained in:
David
2025-11-10 21:58:03 -06:00
parent 4a49069c2a
commit 4c1416851e

View File

@@ -19,6 +19,7 @@ serial_pub = None
thread = None thread = None
class Anchor(Node):
""" """
Publishers: Publishers:
* /anchor/from_vic/debug * /anchor/from_vic/debug
@@ -39,8 +40,6 @@ Subscribers:
- Publish raw strings to this topic to send directly to the MCU for debugging - Publish raw strings to this topic to send directly to the MCU for debugging
""" """
class SerialRelay(Node):
def __init__(self): def __init__(self):
# Initalize node with name # Initalize node with name
super().__init__("anchor_node") # previously 'serial_publisher' super().__init__("anchor_node") # previously 'serial_publisher'
@@ -49,7 +48,7 @@ class SerialRelay(Node):
self.port = None self.port = None
if port_override := os.getenv("PORT_OVERRIDE"): if port_override := os.getenv("PORT_OVERRIDE"):
self.port = port_override self.port = port_override
ports = SerialRelay.list_serial_ports() ports = Anchor.list_serial_ports()
for i in range(4): for i in range(4):
if self.port is not None: if self.port is not None:
break break
@@ -270,7 +269,7 @@ def main(args=None):
global serial_pub global serial_pub
serial_pub = SerialRelay() serial_pub = Anchor()
serial_pub.run() serial_pub.run()