mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2026-02-11 07:03:07 +01:00
Small fix to get keypad running
This commit is contained in:
@@ -1587,9 +1587,7 @@ private:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO (?) multiple keys together
|
// TODO (?) multiple keys together
|
||||||
|
for (uint8_t i=1; i<=28; i++) {
|
||||||
// only process configured key count (default 6)
|
|
||||||
for (uint8_t i=1; i<=6; i++) {
|
|
||||||
tN2kOnOff keystatus = N2kGetStatusOnBinaryStatus(bankstatus, i);
|
tN2kOnOff keystatus = N2kGetStatusOnBinaryStatus(bankstatus, i);
|
||||||
if (keystatus == 1) {
|
if (keystatus == 1) {
|
||||||
// key pressed: send key to queue
|
// key pressed: send key to queue
|
||||||
|
|||||||
@@ -620,7 +620,8 @@ void OBP60Task(GwApi *api){
|
|||||||
if (xQueueReceive(keyboardQueue, &remotekey, 0) == pdPASS) {
|
if (xQueueReceive(keyboardQueue, &remotekey, 0) == pdPASS) {
|
||||||
LOG_DEBUG(GwLog::LOG, "OBP received remote key: %d", remotekey);
|
LOG_DEBUG(GwLog::LOG, "OBP received remote key: %d", remotekey);
|
||||||
// inject into internal keyboard queue
|
// inject into internal keyboard queue
|
||||||
xQueueSend(allParameters.queue, &remotekey, 0);
|
int injectkey = static_cast<int>(remotekey);
|
||||||
|
xQueueSend(allParameters.queue, &injectkey, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check the keyboard message
|
// Check the keyboard message
|
||||||
|
|||||||
@@ -18,6 +18,9 @@
|
|||||||
// CAN NMEA2000
|
// CAN NMEA2000
|
||||||
#define ESP32_CAN_TX_PIN 15
|
#define ESP32_CAN_TX_PIN 15
|
||||||
#define ESP32_CAN_RX_PIN 16
|
#define ESP32_CAN_RX_PIN 16
|
||||||
|
// Temporary fix for Connection Board
|
||||||
|
// #define ESP32_CAN_TX_PIN 16
|
||||||
|
// #define ESP32_CAN_RX_PIN 15
|
||||||
// Bus load in 50mA steps
|
// Bus load in 50mA steps
|
||||||
#define N2K_LOAD_LEVEL 2 // 2x50mA = 100mA max bus load
|
#define N2K_LOAD_LEVEL 2 // 2x50mA = 100mA max bus load
|
||||||
// RS485 NMEA0183
|
// RS485 NMEA0183
|
||||||
|
|||||||
Reference in New Issue
Block a user