From 0d2c3fae89bfb6e337ca33d0be12570f90e2f565 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Wed, 4 Oct 2023 18:53:55 +0200 Subject: [PATCH] hw settings btnpress set: tolerate A/B/a/b for button --- software/script/chameleon_cmd.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/software/script/chameleon_cmd.py b/software/script/chameleon_cmd.py index 2e5812e..1ab67b7 100644 --- a/software/script/chameleon_cmd.py +++ b/software/script/chameleon_cmd.py @@ -353,13 +353,13 @@ class ButtonType(enum.IntEnum): @staticmethod def list_str(): - return list(map(chr, ButtonType)) + return [chr(x) for x in ButtonType]+[chr(x).lower() for x in ButtonType] @staticmethod def from_str(val): - if ButtonType.ButtonA == ord(val): + if ButtonType.ButtonA == ord(val.upper()): return ButtonType.ButtonA - elif ButtonType.ButtonB == ord(val): + elif ButtonType.ButtonB == ord(val.upper()): return ButtonType.ButtonB return None