Skip to content

Commit

Permalink
fix multi_alarm test
Browse files Browse the repository at this point in the history
  • Loading branch information
charles37 committed Nov 13, 2024
1 parent 40e36ce commit d1f77ae
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions hwci/tests/multi_alarm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ def oneshot_test(self, board):
gpio = board.gpio

led_pins = {}
available_leds = ["LED1", "LED2", "LED3", "LED4"] # Extend if needed
available_leds = ["LED1", "LED2"] # Extend if needed "LED3", "LED4" etc...

for led_name in available_leds:
try:
led_pins[led_name] = gpio.pin(
Expand All @@ -30,11 +31,15 @@ def oneshot_test(self, board):
led.set_mode("input")

logging.info("Starting Multi-Alarm Test")
num_leds = 4 # we only have accesss to LEDs 1 and 2, but the test uses 4 LEDs

num_leds = len(led_pins)
spacing = 1.0 # seconds between each LED

interval = spacing * num_leds # Total interval in seconds
test_duration = interval * 2 + spacing # Ensure we capture at least two cycles

test_duration = (
interval * 3 + spacing
) # Ensure we capture at least three cycles

start_time = time.time()

Expand Down

0 comments on commit d1f77ae

Please sign in to comment.