Skip to content

Commit d994df7

Browse files
authored
Merge branch 'main' into file_vali
2 parents 0b12e5b + 51a86f2 commit d994df7

File tree

5 files changed

+28
-15
lines changed

5 files changed

+28
-15
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
PYSQUARED_VERSION ?= v2.0.0-alpha-25w34
2-
PYSQUARED ?= git+https://github.com/proveskit/pysquared@$(PYSQUARED_VERSION)
1+
PYSQUARED_VERSION ?= v2.0.0-alpha-25w40a
2+
PYSQUARED ?= git+https://github.com/proveskit/pysquared@$(PYSQUARED_VERSION)\#subdirectory=circuitpython-workspaces/flight-software
33
BOARD_MOUNT_POINT ?= ""
44
BOARD_TTY_PORT ?= ""
55
VERSION ?= $(shell git tag --points-at HEAD --sort=-creatordate < /dev/null | head -n 1)

src/flight-software/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ def nominal_power_loop():
140140

141141
cdh.listen_for_commands(10)
142142

143-
sleep_helper.safe_sleep(config.sleep_duration)
143+
beacon.send()
144+
145+
cdh.listen_for_commands(config.sleep_duration)
144146

145147
try:
146148
logger.info("Entering main loop")

src/flight-software/repl.py

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
from lib.pysquared.hardware.digitalio import initialize_pin
1919
from lib.pysquared.hardware.imu.manager.lsm6dsox import LSM6DSOXManager
2020
from lib.pysquared.hardware.light_sensor.manager.veml7700 import VEML7700Manager
21+
from lib.pysquared.hardware.load_switch.manager.loadswitch_manager import (
22+
LoadSwitchManager,
23+
)
2124
from lib.pysquared.hardware.magnetometer.manager.lis2mdl import LIS2MDLManager
2225
from lib.pysquared.hardware.power_monitor.manager.ina219 import INA219Manager
2326
from lib.pysquared.hardware.radio.manager.rfm9x import RFM9xManager
@@ -34,6 +37,7 @@
3437

3538
rtc = MicrocontrollerManager()
3639

40+
3741
logger: Logger = Logger(
3842
error_counter=Counter(0),
3943
colorized=False,
@@ -170,27 +174,34 @@ def get_temp(sensor):
170174
PAYLOAD_PWR_ENABLE.direction = digitalio.Direction.OUTPUT
171175

172176

177+
load_switch_0 = LoadSwitchManager(FACE0_ENABLE, True) # type: ignore , upstream on mcp TODO
178+
load_switch_1 = LoadSwitchManager(FACE1_ENABLE, True) # type: ignore , upstream on mcp TODO
179+
load_switch_2 = LoadSwitchManager(FACE2_ENABLE, True) # type: ignore , upstream on mcp TODO
180+
load_switch_3 = LoadSwitchManager(FACE3_ENABLE, True) # type: ignore , upstream on mcp TODO
181+
load_switch_4 = LoadSwitchManager(FACE4_ENABLE, True) # type: ignore , upstream on mcp TODO
182+
183+
173184
# Face Control Helper Functions
174185
def all_faces_off():
175186
"""
176187
This function turns off all of the faces. Note the load switches are disabled low.
177188
"""
178-
FACE0_ENABLE.value = False
179-
FACE1_ENABLE.value = False
180-
FACE2_ENABLE.value = False
181-
FACE3_ENABLE.value = False
182-
FACE4_ENABLE.value = False
189+
load_switch_0.disable_load()
190+
load_switch_1.disable_load()
191+
load_switch_2.disable_load()
192+
load_switch_3.disable_load()
193+
load_switch_4.disable_load()
183194

184195

185196
def all_faces_on():
186197
"""
187198
This function turns on all of the faces. Note the load switches are enabled high.
188199
"""
189-
FACE0_ENABLE.value = True
190-
FACE1_ENABLE.value = True
191-
FACE2_ENABLE.value = True
192-
FACE3_ENABLE.value = True
193-
FACE4_ENABLE.value = True
200+
load_switch_0.enable_load()
201+
load_switch_1.enable_load()
202+
load_switch_2.enable_load()
203+
load_switch_3.enable_load()
204+
load_switch_4.enable_load()
194205

195206

196207
file_validator = FileValidationManager(logger)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
adafruit-circuitpython-asyncio @ git+https://github.com/adafruit/[email protected]
22
adafruit-circuitpython-rfm==1.0.3
33
adafruit-circuitpython-ticks==1.1.1
4-
proveskit-ground-station @ git+https://github.com/proveskit/[email protected]
4+
pysquared-ground-station @ git+https://github.com/proveskit/pysquared@d1b22be#subdirectory=circuitpython-workspaces/ground-station

src/ground-station/repl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import board
22
import digitalio
33
from busio import SPI
4-
from lib.proveskit_ground_station.proveskit_ground_station import GroundStation
4+
from lib.ground_station.ground_station import GroundStation
55
from lib.pysquared.cdh import CommandDataHandler
66
from lib.pysquared.config.config import Config
77
from lib.pysquared.hardware.busio import _spi_init

0 commit comments

Comments
 (0)