From 36521dc619b839f809cd3a84da679a08d3bb90f2 Mon Sep 17 00:00:00 2001 From: Bob Clough Date: Sun, 26 May 2024 22:39:27 +0100 Subject: [PATCH] Add support to mirror the pattern colour onto the hexpansion detect LEDS --- modules/system/hexpansion/app.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/system/hexpansion/app.py b/modules/system/hexpansion/app.py index 982a025..fd64621 100644 --- a/modules/system/hexpansion/app.py +++ b/modules/system/hexpansion/app.py @@ -28,6 +28,7 @@ from events.input import Buttons import vfs import sys +import settings class HexpansionManagerApp(app.App): @@ -230,7 +231,10 @@ async def background_task(self): n, readgpios=False ) if hexpansion_present: - tildagonos.leds[13 + i] = led_colours[i] + if settings.get("pattern_mirror_hexpansions", False): + tildagonos.leds[13 + i] = tildagonos.leds[1 + (i*2)] + else: + tildagonos.leds[13 + i] = led_colours[i] else: tildagonos.leds[13 + i] = (0, 0, 0) if hexpansion_present and not hexpansion_plugin_states[i]: