mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 10:51:57 +00:00
Fix Simpson keypad T9 and buzzer settings
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -325,7 +325,7 @@ struct KeyboardWidget {
|
|||||||
// that construct a KeyboardWidget standalone, in which case isT9() defaults
|
// that construct a KeyboardWidget standalone, in which case isT9() defaults
|
||||||
// to ABC and mainScript()/altScript() default to Latin-only.
|
// to ABC and mainScript()/altScript() default to Latin-only.
|
||||||
NodePrefs* prefs = nullptr;
|
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; }
|
bool isPin() const { return pin_mode; }
|
||||||
// Which script occupies page 0 (the keyboard's default/opening page) and
|
// Which script occupies page 0 (the keyboard's default/opening page) and
|
||||||
// which occupies page 1 (reached by the #@/abc cycle key) -- Settings >
|
// 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
|
// 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
|
// 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.
|
// KEY_KB_ENTER cases just above), so there's no ambiguity here.
|
||||||
if (row < rows && isT9()
|
if (row < rows && isT9()) {
|
||||||
#if defined(SIMPSON)
|
|
||||||
&& !_physical_t9_input
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
int cell = row * cols + col;
|
int cell = row * cols + col;
|
||||||
const char* group = t9GroupStr(cell);
|
const char* group = t9GroupStr(cell);
|
||||||
int glen = kbUtf8Len(group); // codepoint count, not byte length
|
int glen = kbUtf8Len(group); // codepoint count, not byte length
|
||||||
|
|||||||
@@ -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}
|
build_flags = ${Promicro.build_flags}
|
||||||
-I variants/simpson
|
-I variants/simpson
|
||||||
-D SIMPSON
|
-D SIMPSON
|
||||||
|
-D PIN_BUZZER=0
|
||||||
-D PIN_GPS_TX=3
|
-D PIN_GPS_TX=3
|
||||||
-D PIN_GPS_RX=4
|
-D PIN_GPS_RX=4
|
||||||
-D PIN_VIBRATION=1
|
-D PIN_VIBRATION=1
|
||||||
|
|||||||
@@ -42,7 +42,9 @@
|
|||||||
#define PIN_BUTTON1 (6)
|
#define PIN_BUTTON1 (6)
|
||||||
#define BUTTON_PIN PIN_BUTTON1
|
#define BUTTON_PIN PIN_BUTTON1
|
||||||
|
|
||||||
|
#ifndef PIN_BUZZER
|
||||||
#define PIN_BUZZER (0)
|
#define PIN_BUZZER (0)
|
||||||
|
#endif
|
||||||
#ifndef PIN_VIBRATION
|
#ifndef PIN_VIBRATION
|
||||||
#define PIN_VIBRATION (1)
|
#define PIN_VIBRATION (1)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user