From ebada411f7991edc74979f3e560ee89129dbe2e7 Mon Sep 17 00:00:00 2001 From: sim1988son Date: Thu, 15 Oct 2026 22:09:25 +0200 Subject: [PATCH] Fix Simpson keypad T9 and buzzer settings Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- examples/companion_radio/ui-new/KeyboardWidget.h | 8 ++------ variants/simpson/platformio.ini | 1 + variants/simpson/variant.h | 4 +++- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/companion_radio/ui-new/KeyboardWidget.h b/examples/companion_radio/ui-new/KeyboardWidget.h index acdd1329..0ba898ad 100644 --- a/examples/companion_radio/ui-new/KeyboardWidget.h +++ b/examples/companion_radio/ui-new/KeyboardWidget.h @@ -325,7 +325,7 @@ struct KeyboardWidget { // that construct a KeyboardWidget standalone, in which case isT9() defaults // to ABC and mainScript()/altScript() default to Latin-only. NodePrefs* prefs = nullptr; - bool isT9() const { return prefs && prefs->keyboard_type == 1; } + bool isT9() const { return _physical_t9_input || (prefs && prefs->keyboard_type == 1); } bool isPin() const { return pin_mode; } // Which script occupies page 0 (the keyboard's default/opening page) and // which occupies page 1 (reached by the #@/abc cycle key) -- Settings > @@ -1273,11 +1273,7 @@ struct KeyboardWidget { // the special row's DONE cell -- same as a physical button. CardKB's // own Enter is only ever KEY_ENTER when that's true (see pollCardKB()'s // KEY_KB_ENTER cases just above), so there's no ambiguity here. - if (row < rows && isT9() -#if defined(SIMPSON) - && !_physical_t9_input -#endif - ) { + if (row < rows && isT9()) { int cell = row * cols + col; const char* group = t9GroupStr(cell); int glen = kbUtf8Len(group); // codepoint count, not byte length diff --git a/variants/simpson/platformio.ini b/variants/simpson/platformio.ini index b86b1d96..8ecd4ea1 100644 --- a/variants/simpson/platformio.ini +++ b/variants/simpson/platformio.ini @@ -4,6 +4,7 @@ build_unflags = -D PIN_GPS_RX=3 -D PIN_GPS_TX=4 -D ENV_INCLUDE_AHTX0=1 -D ENV_IN build_flags = ${Promicro.build_flags} -I variants/simpson -D SIMPSON + -D PIN_BUZZER=0 -D PIN_GPS_TX=3 -D PIN_GPS_RX=4 -D PIN_VIBRATION=1 diff --git a/variants/simpson/variant.h b/variants/simpson/variant.h index 4ad67242..f9462f78 100644 --- a/variants/simpson/variant.h +++ b/variants/simpson/variant.h @@ -42,7 +42,9 @@ #define PIN_BUTTON1 (6) #define BUTTON_PIN PIN_BUTTON1 -#define PIN_BUZZER (0) +#ifndef PIN_BUZZER + #define PIN_BUZZER (0) +#endif #ifndef PIN_VIBRATION #define PIN_VIBRATION (1) #endif