From c4e2cdf4d41a6f1b486e23997d3189f99f89cf6e Mon Sep 17 00:00:00 2001 From: Bailey Steinfadt Date: Fri, 1 Nov 2024 16:51:30 -0500 Subject: [PATCH] Fixed end of boot to go green if touchwheel is configured and red if it isn't found --- software/software/boot.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/software/software/boot.py b/software/software/boot.py index dbc365b..0b05922 100644 --- a/software/software/boot.py +++ b/software/software/boot.py @@ -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]))