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
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"modulation_type": 0,
"node_address": 1
},
"license": "",
"license": "HHH",
"lora": {
"ack_delay": 0.2,
"coding_rate": 8,
Expand Down
1 change: 1 addition & 0 deletions src/flight-software/lib/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion src/flight-software/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 4 additions & 1 deletion src/flight-software/repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion src/ground-station/lib/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
8 changes: 3 additions & 5 deletions src/ground-station/repl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -16,6 +17,7 @@
colorized=False,
)
config: Config = Config("config.json")
jokes_config: JokesConfig = JokesConfig("jokes.json")

spi0: SPI = _spi_init(
logger,
Expand All @@ -40,11 +42,7 @@
0.2,
)

cdh = CommandDataHandler(
logger,
config,
packet_manager,
)
cdh = CommandDataHandler(logger, config, packet_manager, jokes_config)

ground_station = GroundStation(
logger,
Expand Down