mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +00:00
Freetext Input with CardKB Take 1 - Also removes FacesKB support, this thing is ancient.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
#include <Wire.h>
|
||||
|
||||
extern uint8_t cardkb_found;
|
||||
extern uint8_t faceskb_found;
|
||||
|
||||
KbI2cBase::KbI2cBase(const char *name) : concurrency::OSThread(name)
|
||||
{
|
||||
@@ -12,7 +11,7 @@ KbI2cBase::KbI2cBase(const char *name) : concurrency::OSThread(name)
|
||||
|
||||
int32_t KbI2cBase::runOnce()
|
||||
{
|
||||
if ((cardkb_found != CARDKB_ADDR) && (faceskb_found != CARDKB_ADDR)){
|
||||
if (cardkb_found != CARDKB_ADDR){
|
||||
// Input device is not detected.
|
||||
return INT32_MAX;
|
||||
}
|
||||
@@ -30,6 +29,7 @@ int32_t KbI2cBase::runOnce()
|
||||
break;
|
||||
case 0x08: // Back
|
||||
e.inputEvent = ModuleConfig_CannedMessageConfig_InputEventChar_BACK;
|
||||
e.kbchar = c;
|
||||
break;
|
||||
case 0xb5: // Up
|
||||
e.inputEvent = ModuleConfig_CannedMessageConfig_InputEventChar_UP;
|
||||
@@ -39,13 +39,22 @@ int32_t KbI2cBase::runOnce()
|
||||
break;
|
||||
case 0xb4: // Left
|
||||
e.inputEvent = ModuleConfig_CannedMessageConfig_InputEventChar_LEFT;
|
||||
e.kbchar = c;
|
||||
break;
|
||||
case 0xb7: // Right
|
||||
e.inputEvent = ModuleConfig_CannedMessageConfig_InputEventChar_RIGHT;
|
||||
e.kbchar = c;
|
||||
break;
|
||||
case 0x0d: // Enter
|
||||
e.inputEvent = ModuleConfig_CannedMessageConfig_InputEventChar_SELECT;
|
||||
break;
|
||||
case 0x00: //nopress
|
||||
e.inputEvent = ModuleConfig_CannedMessageConfig_InputEventChar_NONE;
|
||||
break;
|
||||
default: // all other keys
|
||||
e.inputEvent = ANYKEY;
|
||||
e.kbchar = c;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user