Skip to content

Commit 9b979bf

Browse files
committed
got rid of boot messages, added helper functions
1 parent 7f94b6e commit 9b979bf

File tree

2 files changed

+27
-6
lines changed

2 files changed

+27
-6
lines changed

src/flight-software/boot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
storage.disable_usb_drive() # disable CIRCUITPY
1313
# After the USB drive is disabled, we can remount the /sd filesystem
1414
# as writable for our CircuitPython code.
15-
storage.remount("/sd", readonly=False)
15+
# storage.remount("/sd", readonly=False)
1616

17-
os.mkdir("/sd", exist_ok=True) # Ensure the lib directory exists
17+
# os.mkdir("/sd") # Ensure the lib directory exists'
1818

1919
# from lib.pysquared.logger import Logger
2020

src/flight-software/repl.py

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33

44
import board
55
import digitalio
6-
from lib.adafruit_mcp230xx.mcp23017 import (
7-
MCP23017, # This is Hacky V5a Devel Stuff###
8-
)
6+
97
from lib.adafruit_tca9548a import TCA9548A # This is Hacky V5a Devel Stuff###
108

11-
# from lib.pysquared.Big_Data import AllFaces ### This is Hacky V5a Devel Stuff###
9+
import storage
10+
11+
#need to call this to write new code to the board, otherwise the baord will not appear!
12+
def wipe_system():
13+
storage.erase_filesystem()
14+
# from lib.pysquared.Big_Data import AllFaces ### This is Hacky V5a Devel Stuff##
1215
from lib.pysquared.beacon import Beacon
1316
from lib.pysquared.cdh import CommandDataHandler
1417
from lib.pysquared.config.config import Config
@@ -29,6 +32,22 @@
2932
from lib.pysquared.watchdog import Watchdog
3033
from version import __version__
3134

35+
#TO DO: turn this into a real test for our flash memory
36+
def test_sd():
37+
print(os.listdir())
38+
print("___________")
39+
os.mkdir('sd/new_folder')
40+
print(os.listdir('sd'))
41+
print("_______________")
42+
with open('boot_out.txt', 'r') as file:
43+
print(file.read())
44+
45+
46+
47+
from lib.adafruit_mcp230xx.mcp23017 import (
48+
MCP23017, # This is Hacky V5a Devel Stuff###
49+
)
50+
3251
rtc = MicrocontrollerManager()
3352

3453
logger: Logger = Logger(
@@ -191,6 +210,8 @@ def all_faces_on():
191210
FACE4_ENABLE.value = True
192211

193212

213+
214+
194215
## Face Sensor Stuff ##
195216

196217
# This is the TCA9548A I2C Multiplexer

0 commit comments

Comments
 (0)