Skip to content

Commit

Permalink
Rename and reorder input variables
Browse files Browse the repository at this point in the history
  • Loading branch information
EliasJRH committed Jul 25, 2024
1 parent c23c1bb commit c967b91
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions modules/telemetry/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from time import sleep
from typing import Any, TypeAlias
import modules.telemetry.json_packets as jsp
# import modules.websocket.commands as wsc
import modules.telemetry.telemetry_websocket_commands as wsc
from modules.misc.config import Config
from modules.telemetry.replay import TelemetryReplay
Expand Down Expand Up @@ -45,7 +44,7 @@ class Telemetry:
def __init__(
self,
serial_status: Queue[str],
radio_payloads: Queue[Any],
rn2483_radio_payloads: Queue[Any],
rn2483_radio_input: Queue[str],
radio_signal_report: Queue[str],
telemetry_json_output: Queue[JSON],
Expand All @@ -54,15 +53,15 @@ def __init__(
version: str,
):
super().__init__()
self.config = config
self.version = version

self.radio_payloads: Queue[str] = radio_payloads
self.telemetry_json_output: Queue[JSON] = telemetry_json_output
self.telemetry_ws_commands: Queue[list[str]] = telemetry_ws_commands
self.serial_status: Queue[str] = serial_status
self.rn2483_radio_payloads: Queue[str] = rn2483_radio_payloads
self.rn2483_radio_input: Queue[str] = rn2483_radio_input
self.radio_signal_report: Queue[str] = radio_signal_report
self.serial_status: Queue[str] = serial_status
self.telemetry_json_output: Queue[JSON] = telemetry_json_output
self.telemetry_ws_commands: Queue[list[str]] = telemetry_ws_commands

self.config = config
self.version = version

# Telemetry Data holds the last few copies of received data blocks stored under the subtype name as a key.
self.status: jsp.StatusData = jsp.StatusData()
Expand Down Expand Up @@ -123,8 +122,8 @@ def run(self):
self.process_transmission(self.replay_output.get())
self.update_websocket()
case _:
while not self.radio_payloads.empty():
self.process_transmission(self.radio_payloads.get())
while not self.rn2483_radio_payloads.empty():
self.process_transmission(self.rn2483_radio_payloads.get())
self.update_websocket()

def update_websocket(self) -> None:
Expand Down

0 comments on commit c967b91

Please sign in to comment.