Skip to content

Commit 491e780

Browse files
committed
added the ground the station
1 parent f1178ff commit 491e780

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

src/flight-software/repl.py

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
from lib.pysquared.hardware.digitalio import initialize_pin
1414
from lib.pysquared.hardware.imu.manager.lsm6dsox import LSM6DSOXManager
1515
from lib.pysquared.hardware.light_sensor.manager.veml7700 import VEML7700Manager
16+
from lib.pysquared.hardware.load_switch.manager.loadswitch_manager import (
17+
LoadSwitchManager,
18+
)
1619
from lib.pysquared.hardware.magnetometer.manager.lis2mdl import LIS2MDLManager
1720
from lib.pysquared.hardware.power_monitor.manager.ina219 import INA219Manager
1821
from lib.pysquared.hardware.radio.manager.rfm9x import RFM9xManager
@@ -173,28 +176,34 @@ def get_temp(sensor):
173176
sband_radio,
174177
)
175178

179+
load_switch_0 = LoadSwitchManager(FACE0_ENABLE, True)
180+
load_switch_1 = LoadSwitchManager(FACE1_ENABLE, True)
181+
load_switch_2 = LoadSwitchManager(FACE2_ENABLE, True)
182+
load_switch_3 = LoadSwitchManager(FACE3_ENABLE, True)
183+
load_switch_4 = LoadSwitchManager(FACE4_ENABLE, True)
184+
176185

177186
# Face Control Helper Functions
178187
def all_faces_off():
179188
"""
180189
This function turns off all of the faces. Note the load switches are disabled low.
181190
"""
182-
FACE0_ENABLE.value = False
183-
FACE1_ENABLE.value = False
184-
FACE2_ENABLE.value = False
185-
FACE3_ENABLE.value = False
186-
FACE4_ENABLE.value = False
191+
load_switch_0.disable_load()
192+
load_switch_1.disable_load()
193+
load_switch_2.disable_load()
194+
load_switch_3.disable_load()
195+
load_switch_4.disable_load()
187196

188197

189198
def all_faces_on():
190199
"""
191200
This function turns on all of the faces. Note the load switches are enabled high.
192201
"""
193-
FACE0_ENABLE.value = True
194-
FACE1_ENABLE.value = True
195-
FACE2_ENABLE.value = True
196-
FACE3_ENABLE.value = True
197-
FACE4_ENABLE.value = True
202+
load_switch_0.enable_load()
203+
load_switch_1.enable_load()
204+
load_switch_2.enable_load()
205+
load_switch_3.enable_load()
206+
load_switch_4.enable_load()
198207

199208

200209
## Face Sensor Stuff ##
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)