mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-22 09:31:10 +00:00
trunked
This commit is contained in:
parent
92b3b208c4
commit
5a72eeae61
@ -157,7 +157,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MLX90614_ADDR_DEF 0x5A
|
#define MLX90614_ADDR_DEF 0x5A
|
||||||
#define CGRADSENS_ADDR 0x66
|
#define CGRADSENS_ADDR 0x66
|
||||||
#define LTR390UV_ADDR 0x53
|
#define LTR390UV_ADDR 0x53
|
||||||
#define XPOWERS_AXP192_AXP2101_ADDRESS 0x34 //same adress as TCA8418
|
#define XPOWERS_AXP192_AXP2101_ADDRESS 0x34 // same adress as TCA8418
|
||||||
|
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// ACCELEROMETER
|
// ACCELEROMETER
|
||||||
|
@ -107,7 +107,8 @@ enum {
|
|||||||
#define _TCA8418_ROWS 4
|
#define _TCA8418_ROWS 4
|
||||||
#define _TCA8418_NUM_KEYS 12
|
#define _TCA8418_NUM_KEYS 12
|
||||||
|
|
||||||
uint8_t TCA8418TapMod[_TCA8418_NUM_KEYS] = {13, 7, 7, 7, 7, 7, 9, 7, 9, 2, 2, 2}; // Num chars per key, Modulus for rotating through characters
|
uint8_t TCA8418TapMod[_TCA8418_NUM_KEYS] = {13, 7, 7, 7, 7, 7,
|
||||||
|
9, 7, 9, 2, 2, 2}; // Num chars per key, Modulus for rotating through characters
|
||||||
|
|
||||||
unsigned char TCA8418TapMap[_TCA8418_NUM_KEYS][13] = {
|
unsigned char TCA8418TapMap[_TCA8418_NUM_KEYS][13] = {
|
||||||
{'1', '.', ',', '?', '!', ':', ';', '-', '_', '\\', '/', '(', ')'}, // 1
|
{'1', '.', ',', '?', '!', ':', ';', '-', '_', '\\', '/', '(', ')'}, // 1
|
||||||
@ -142,7 +143,6 @@ unsigned char TCA8418LongPressMap[_TCA8418_NUM_KEYS] = {
|
|||||||
#define _TCA8418_LONG_PRESS_THRESHOLD 2000
|
#define _TCA8418_LONG_PRESS_THRESHOLD 2000
|
||||||
#define _TCA8418_MULTI_TAP_THRESHOLD 750
|
#define _TCA8418_MULTI_TAP_THRESHOLD 750
|
||||||
|
|
||||||
|
|
||||||
TCA8418Keyboard::TCA8418Keyboard() : m_wire(nullptr), m_addr(0), readCallback(nullptr), writeCallback(nullptr)
|
TCA8418Keyboard::TCA8418Keyboard() : m_wire(nullptr), m_addr(0), readCallback(nullptr), writeCallback(nullptr)
|
||||||
{
|
{
|
||||||
state = Init;
|
state = Init;
|
||||||
@ -338,7 +338,6 @@ void TCA8418Keyboard::pressed(uint8_t key)
|
|||||||
// Store the current key as the last key
|
// Store the current key as the last key
|
||||||
last_key = next_key;
|
last_key = next_key;
|
||||||
last_tap = now;
|
last_tap = now;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TCA8418Keyboard::released()
|
void TCA8418Keyboard::released()
|
||||||
@ -560,4 +559,3 @@ void TCA8418Keyboard::writeRegister(uint8_t reg, uint8_t value)
|
|||||||
writeCallback(m_addr, data[0], &(data[1]), 1);
|
writeCallback(m_addr, data[0], &(data[1]), 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user