feat(connector.py): send initial telemetry after HELLO
This commit is contained in:
@@ -116,6 +116,14 @@ class Connector:
|
|||||||
hello_message: Message = Message.Control.hello(self.mac_address)
|
hello_message: Message = Message.Control.hello(self.mac_address)
|
||||||
self.send(hello_message)
|
self.send(hello_message)
|
||||||
|
|
||||||
|
def send_initial_telemetry(self) -> None:
|
||||||
|
"""Send initial telemetry data to the server."""
|
||||||
|
self.logger.debug("[*] Sending initial telemetry...")
|
||||||
|
telemetry_message: Message = Message.Telemetry.initial(
|
||||||
|
self.client.initial_telemetry
|
||||||
|
)
|
||||||
|
self.send(telemetry_message)
|
||||||
|
|
||||||
def close(self) -> None:
|
def close(self) -> None:
|
||||||
"""Close the connection and clean up resources."""
|
"""Close the connection and clean up resources."""
|
||||||
self.logger.debug("[*] Closing connection...")
|
self.logger.debug("[*] Closing connection...")
|
||||||
@@ -177,6 +185,7 @@ class Connector:
|
|||||||
|
|
||||||
self.logger.debug("[*] Connected, sending HELLO...")
|
self.logger.debug("[*] Connected, sending HELLO...")
|
||||||
self.send_hello()
|
self.send_hello()
|
||||||
|
self.send_initial_telemetry()
|
||||||
|
|
||||||
def run(self) -> None:
|
def run(self) -> None:
|
||||||
"""Run the main event loop."""
|
"""Run the main event loop."""
|
||||||
|
|||||||
Reference in New Issue
Block a user