diff --git a/src/input/ExpressLRSFiveWay.cpp b/src/input/ExpressLRSFiveWay.cpp index 56413bd55..dc5fa247c 100644 --- a/src/input/ExpressLRSFiveWay.cpp +++ b/src/input/ExpressLRSFiveWay.cpp @@ -146,31 +146,31 @@ void ExpressLRSFiveWay::determineAction(KeyType key, PressLength length) { switch (key) { case LEFT: - if (inCannedMessageMenu()) // If in canned message menu - sendKey(CANCEL); // exit the menu (press imaginary cancel key) + if (inCannedMessageMenu()) // If in canned message menu + sendKey(INPUT_BROKER_CANCEL); // exit the menu (press imaginary cancel key) else - sendKey(LEFT); + sendKey(INPUT_BROKER_LEFT); break; case RIGHT: - if (inCannedMessageMenu()) // If in canned message menu: - sendKey(CANCEL); // exit the menu (press imaginary cancel key) + if (inCannedMessageMenu()) // If in canned message menu: + sendKey(INPUT_BROKER_CANCEL); // exit the menu (press imaginary cancel key) else - sendKey(RIGHT); + sendKey(INPUT_BROKER_RIGHT); break; case UP: if (length == LONG) toggleGPS(); else - sendKey(UP); + sendKey(INPUT_BROKER_UP); break; case DOWN: if (length == LONG) sendAdhocPing(); else - sendKey(DOWN); + sendKey(INPUT_BROKER_DOWN); break; case OK: @@ -186,7 +186,7 @@ void ExpressLRSFiveWay::determineAction(KeyType key, PressLength length) } // Feed input to the canned messages module -void ExpressLRSFiveWay::sendKey(KeyType key) +void ExpressLRSFiveWay::sendKey(input_broker_event key) { InputEvent e; e.source = inputSourceName; @@ -251,7 +251,7 @@ void ExpressLRSFiveWay::click() if (!moduleConfig.canned_message.enabled) powerFSM.trigger(EVENT_PRESS); else - sendKey(OK); + sendKey(INPUT_BROKER_SELECT); } ExpressLRSFiveWay *expressLRSFiveWayInput = nullptr; diff --git a/src/input/ExpressLRSFiveWay.h b/src/input/ExpressLRSFiveWay.h index cfd066354..7c7f210f8 100644 --- a/src/input/ExpressLRSFiveWay.h +++ b/src/input/ExpressLRSFiveWay.h @@ -63,7 +63,7 @@ class ExpressLRSFiveWay : public Observable, public concurre // Meshtastic code void determineAction(KeyType key, PressLength length); - void sendKey(KeyType key); + void sendKey(input_broker_event key); inline bool inCannedMessageMenu() { return cannedMessageModule->shouldDraw(); } int32_t runOnce() override;