mirror of
https://github.com/SHC-ASTRA/rover-ros2.git
synced 2026-02-11 09:20:40 +00:00
style: move pub/sub docs comment, rename SerialPub to Anchor
This commit is contained in:
@@ -19,6 +19,7 @@ serial_pub = None
|
||||
thread = None
|
||||
|
||||
|
||||
class Anchor(Node):
|
||||
"""
|
||||
Publishers:
|
||||
* /anchor/from_vic/debug
|
||||
@@ -39,8 +40,6 @@ Subscribers:
|
||||
- Publish raw strings to this topic to send directly to the MCU for debugging
|
||||
"""
|
||||
|
||||
|
||||
class SerialRelay(Node):
|
||||
def __init__(self):
|
||||
# Initalize node with name
|
||||
super().__init__("anchor_node") # previously 'serial_publisher'
|
||||
@@ -49,7 +48,7 @@ class SerialRelay(Node):
|
||||
self.port = None
|
||||
if port_override := os.getenv("PORT_OVERRIDE"):
|
||||
self.port = port_override
|
||||
ports = SerialRelay.list_serial_ports()
|
||||
ports = Anchor.list_serial_ports()
|
||||
for i in range(4):
|
||||
if self.port is not None:
|
||||
break
|
||||
@@ -270,7 +269,7 @@ def main(args=None):
|
||||
|
||||
global serial_pub
|
||||
|
||||
serial_pub = SerialRelay()
|
||||
serial_pub = Anchor()
|
||||
serial_pub.run()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user