diff --git a/Makefile b/Makefile index c9467e9..c113ac5 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ -PYSQUARED_VERSION ?= v2.0.0-alpha-25w40a +PYSQUARED_VERSION ?= copilot/fix-7bfb9c49-466e-42db-a6be-dece956d6d8c PYSQUARED ?= git+https://github.com/proveskit/pysquared@$(PYSQUARED_VERSION)\#subdirectory=circuitpython-workspaces/flight-software +PYSQUARED_GS ?= git+https://github.com/proveskit/pysquared@$(PYSQUARED_VERSION)\#subdirectory=circuitpython-workspaces/ground-station BOARD_MOUNT_POINT ?= "" BOARD_TTY_PORT ?= "" VERSION ?= $(shell git tag --points-at HEAD --sort=-creatordate < /dev/null | head -n 1) @@ -33,6 +34,11 @@ download-libraries-%: uv .venv ## Download the required libraries @$(UV) pip install --requirement src/$*/lib/requirements.txt --target src/$*/lib --no-deps --upgrade --quiet @$(UV) pip --no-cache install $(PYSQUARED) --target src/$*/lib --no-deps --upgrade --quiet + @if [ "$*" = "ground-station" ]; then \ + echo "Also downloading GS..."; \ + $(UV) pip --no-cache install $(PYSQUARED_GS) --target src/$*/lib --no-deps --upgrade --quiet; \ + fi + @rm -rf src/$*/lib/*.dist-info @rm -rf src/$*/lib/.lock diff --git a/config.json b/config.json index 78fb9f8..8e4742d 100644 --- a/config.json +++ b/config.json @@ -22,7 +22,7 @@ "modulation_type": 0, "node_address": 1 }, - "license": "", + "license": "HHH", "lora": { "ack_delay": 0.2, "coding_rate": 8, diff --git a/src/flight-software/lib/requirements.txt b/src/flight-software/lib/requirements.txt index 4a5ad0e..dbe383b 100644 --- a/src/flight-software/lib/requirements.txt +++ b/src/flight-software/lib/requirements.txt @@ -14,3 +14,4 @@ adafruit-circuitpython-hashlib==1.4.19 Adafruit_CircuitPython_MCP230xx proves-circuitpython-rv3028 @ git+https://github.com/proveskit/PROVES_CircuitPython_RV3028@1.0.0 proves-circuitpython-sx1280 @ git+https://github.com/proveskit/CircuitPython_SX1280@1.0.3 +circuitpython-hmac @ git+https://github.com/jimbobbennett/CircuitPython_HMAC@0.2.1 diff --git a/src/flight-software/main.py b/src/flight-software/main.py index 5713455..8b67a62 100644 --- a/src/flight-software/main.py +++ b/src/flight-software/main.py @@ -9,6 +9,7 @@ from lib.pysquared.beacon import Beacon from lib.pysquared.cdh import CommandDataHandler from lib.pysquared.config.config import Config +from lib.pysquared.config.jokes_config import JokesConfig from lib.pysquared.hardware.busio import _spi_init, initialize_i2c_bus from lib.pysquared.hardware.digitalio import initialize_pin from lib.pysquared.hardware.imu.manager.lsm6dsox import LSM6DSOXManager @@ -52,6 +53,7 @@ logger.debug("Initializing Config") config: Config = Config("config.json") + jokes_config: JokesConfig = JokesConfig("jokes.json") mux_reset = initialize_pin( logger, board.MUX_RESET, digitalio.Direction.OUTPUT, False @@ -113,7 +115,7 @@ 0.2, ) - cdh = CommandDataHandler(logger, config, uhf_packet_manager) + cdh = CommandDataHandler(logger, config, uhf_packet_manager, jokes_config) beacon = Beacon( logger, diff --git a/src/flight-software/repl.py b/src/flight-software/repl.py index 8092a32..b888ffb 100644 --- a/src/flight-software/repl.py +++ b/src/flight-software/repl.py @@ -12,6 +12,7 @@ from lib.pysquared.beacon import Beacon from lib.pysquared.cdh import CommandDataHandler from lib.pysquared.config.config import Config +from lib.pysquared.config.jokes_config import JokesConfig from lib.pysquared.file_validation.manager.file_validation import FileValidationManager from lib.pysquared.hardware.burnwire.manager.burnwire import BurnwireManager from lib.pysquared.hardware.busio import _spi_init, initialize_i2c_bus @@ -61,6 +62,8 @@ def get_temp(sensor): logger.debug("Initializing Config") config: Config = Config("config.json") +jokes_config: JokesConfig = JokesConfig("jokes.json") + mux_reset = initialize_pin(logger, board.MUX_RESET, digitalio.Direction.OUTPUT, False) @@ -127,7 +130,7 @@ def get_temp(sensor): 0.2, ) -cdh = CommandDataHandler(logger, config, uhf_packet_manager) +cdh = CommandDataHandler(logger, config, uhf_packet_manager, jokes_config) beacon = Beacon( logger, diff --git a/src/ground-station/lib/requirements.txt b/src/ground-station/lib/requirements.txt index 7048407..6d4b11c 100644 --- a/src/ground-station/lib/requirements.txt +++ b/src/ground-station/lib/requirements.txt @@ -1,4 +1,5 @@ adafruit-circuitpython-asyncio @ git+https://github.com/adafruit/adafruit_circuitpython_asyncio@1.3.3 adafruit-circuitpython-rfm==1.0.3 adafruit-circuitpython-ticks==1.1.1 -pysquared-ground-station @ git+https://github.com/proveskit/pysquared@d1b22be#subdirectory=circuitpython-workspaces/ground-station +circuitpython-hmac @ git+https://github.com/jimbobbennett/CircuitPython_HMAC@0.2.1 +adafruit-circuitpython-hashlib==1.4.19 diff --git a/src/ground-station/repl.py b/src/ground-station/repl.py index 924bda3..83e8931 100644 --- a/src/ground-station/repl.py +++ b/src/ground-station/repl.py @@ -4,6 +4,7 @@ from lib.ground_station.ground_station import GroundStation from lib.pysquared.cdh import CommandDataHandler from lib.pysquared.config.config import Config +from lib.pysquared.config.jokes_config import JokesConfig from lib.pysquared.hardware.busio import _spi_init from lib.pysquared.hardware.digitalio import initialize_pin from lib.pysquared.hardware.radio.manager.rfm9x import RFM9xManager @@ -16,6 +17,7 @@ colorized=False, ) config: Config = Config("config.json") +jokes_config: JokesConfig = JokesConfig("jokes.json") spi0: SPI = _spi_init( logger, @@ -40,11 +42,7 @@ 0.2, ) -cdh = CommandDataHandler( - logger, - config, - packet_manager, -) +cdh = CommandDataHandler(logger, config, packet_manager, jokes_config) ground_station = GroundStation( logger,