Skip to content

Commit 84d6ac5

Browse files
committed
Cleaned Up Burnwire Stuff
1 parent 0f4947e commit 84d6ac5

File tree

2 files changed

+9
-60
lines changed

2 files changed

+9
-60
lines changed

src/flight-software/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
logger.info(
3939
"Booting",
40-
hardware_version=os.uname().version,
40+
hardware_version=os.uname().version, # type: ignore[attr-defined]
4141
software_version=__version__,
4242
)
4343

src/flight-software/repl.py

Lines changed: 8 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,8 @@
1+
import os
12
import time
23

4+
import board
35
import digitalio
4-
5-
try:
6-
# from board_definitions import proveskit_rp2040_v4 as board
7-
raise ImportError
8-
except ImportError:
9-
import board
10-
11-
try:
12-
pass
13-
except Exception:
14-
pass
15-
16-
import os
17-
186
from lib.adafruit_mcp230xx.mcp23017 import (
197
MCP23017, # This is Hacky V5a Devel Stuff###
208
)
@@ -52,7 +40,7 @@
5240

5341
logger.info(
5442
"Booting",
55-
hardware_version=os.uname().version,
43+
hardware_version=os.uname().version, # type: ignore[attr-defined]
5644
software_version=__version__,
5745
)
5846

@@ -147,44 +135,6 @@ def get_temp(sensor):
147135
sband_radio,
148136
)
149137

150-
151-
def dumb_burn(duration=5) -> None:
152-
"""
153-
This function is used to test the burn wire.
154-
It will turn on the burn wire for 5 seconds and then turn it off.
155-
156-
Args:
157-
duration (int): The duration to burn for in seconds. Default is 5 seconds.
158-
Returns:
159-
None
160-
"""
161-
burnwire_heater_enable.value = False
162-
burnwire1_fire.value = False
163-
logger.info("Burn Wire Enabled")
164-
time.sleep(duration)
165-
logger.info("Burn Wire Disabled")
166-
burnwire_heater_enable.value = True
167-
burnwire1_fire.value = True
168-
169-
170-
## Initializing the Heater ##
171-
def heater_pulse() -> None:
172-
"""
173-
This function is used to turn on the heater.
174-
It will turn on the heater for 5 seconds and then turn it off.
175-
176-
Args:
177-
None
178-
Returns:
179-
None
180-
"""
181-
ENABLE_HEATER.value = False
182-
logger.info("Heater Enabled")
183-
time.sleep(5)
184-
logger.info("Heater Disabled")
185-
ENABLE_HEATER.value = True
186-
187-
188138
## Initialize the MCP23017 GPIO Expander and its pins ##
189139
GPIO_RESET = initialize_pin(
190140
logger, board.GPIO_EXPANDER_RESET, digitalio.Direction.OUTPUT, True
@@ -264,13 +214,12 @@ def all_faces_on():
264214
temp_sensor1 = MCP9808Manager(logger, tca[1], addr=27)
265215
temp_sensor2 = MCP9808Manager(logger, tca[2], addr=27)
266216
temp_sensor3 = MCP9808Manager(logger, tca[3], addr=27)
267-
# temp_sensor4 = MCP9808Manager(logger, tca[4], addr=27)
217+
temp_sensor4 = MCP9808Manager(logger, tca[4], addr=27)
218+
219+
220+
battery_power_monitor: PowerMonitorProto = INA219Manager(logger, i2c1, 0x40)
221+
solar_power_monitor: PowerMonitorProto = INA219Manager(logger, i2c1, 0x44)
268222

269-
try:
270-
battery_power_monitor: PowerMonitorProto = INA219Manager(logger, i2c1, 0x40)
271-
solar_power_monitor: PowerMonitorProto = INA219Manager(logger, i2c1, 0x44)
272-
except Exception as e:
273-
logger.error("Error Initializing Power Monitors", e)
274223

275224
## Init Misc Pins ##
276225
burnwire_heater_enable = initialize_pin(

0 commit comments

Comments
 (0)