Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions proveskit_ground_station/proveskit_ground_station.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __init__(
cdh: CommandDataHandler,
):
self._log = logger
self._log.colorized = True
self._log._colorized = True
self._config = config
self._packet_manager = packet_manager
self._cdh = cdh
Expand Down Expand Up @@ -58,7 +58,11 @@ def send_receive(self):
self._log.debug("Keyboard interrupt received, exiting send mode.")

def handle_input(self, cmd_selection):
if cmd_selection not in ["1", "2", "3"]:
if cmd_selection not in [
self._cdh.command_reset,
self._cdh.command_change_radio_modulation,
self._cdh.command_send_joke,
]:
self._log.warning("Invalid command selection. Please try again.")
return

Expand All @@ -67,13 +71,13 @@ def handle_input(self, cmd_selection):
"password": self._config.super_secret_code,
}

if cmd_selection == "1":
if cmd_selection == self._cdh.command_reset:
message["command"] = self._cdh.command_reset
elif cmd_selection == "2":
elif cmd_selection == self._cdh.command_change_radio_modulation:
message["command"] = self._cdh.command_change_radio_modulation
modulation = input("Enter new radio modulation [FSK | LoRa]: ")
message["args"] = [modulation]
elif cmd_selection == "3":
elif cmd_selection == self._cdh.command_send_joke:
message["command"] = self._cdh.command_send_joke

while True:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ description = "PROVESKIT Ground Station Software"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"pysquared @ git+https://github.com/proveskit/pysquared@ngay-new-state-of-health",
"pysquared @ git+https://github.com/proveskit/pysquared@v2.0.0-alpha-25w36",
]

[dependency-groups]
dev = [
"adafruit-circuitpython-typing==1.12.1",
"circuitpython-stubs==9.2.8",
"pre-commit==4.2.0",
"pyright[nodejs]==1.1.402",
"pyright[nodejs]==1.1.404",
]

[tool.setuptools]
Expand Down
Loading