Skip to content

Commit

Permalink
Fixed end of boot to go green if touchwheel is configured and red if …
Browse files Browse the repository at this point in the history
…it isn't found
  • Loading branch information
baileysage committed Nov 6, 2024
1 parent 3afccbd commit c4e2cdf
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions software/software/boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,14 @@ def touchwheel_rgb(bus, r, g, b):


## goes green if wheel configured
## goes red if wheel is not found
if touchwheel_bus and petal_bus:
petal_bus.writeto_mem(PETAL_ADDRESS, 3, bytes([0x00]))
if petal_bus:
petal_bus.writeto_mem(PETAL_ADDRESS, 2, bytes([0x80]))
petal_bus.writeto_mem(PETAL_ADDRESS, 4, bytes([0x80]))
time.sleep_ms(200)
petal_bus.writeto_mem(PETAL_ADDRESS, 2, bytes([0x00]))
petal_bus.writeto_mem(PETAL_ADDRESS, 4, bytes([0x00]))
if petal_bus and not touchwheel_bus:
petal_bus.writeto_mem(PETAL_ADDRESS, 3, bytes([0x80]))
time.sleep_ms(200)
petal_bus.writeto_mem(PETAL_ADDRESS, 3, bytes([0x00]))


0 comments on commit c4e2cdf

Please sign in to comment.