This commit is contained in:
Jonathan Bennett 2025-06-06 21:55:30 -05:00
parent b177329813
commit f4c5e31f3d
2 changed files with 38 additions and 38 deletions

View File

@ -8,12 +8,12 @@
#include "PowerFSM.h"
#include "RadioLibInterface.h"
#include "buzz.h"
#include "input/InputBroker.h"
#include "main.h"
#include "modules/CannedMessageModule.h"
#include "modules/ExternalNotificationModule.h"
#include "power.h"
#include "sleep.h"
#include "input/InputBroker.h"
#ifdef ARCH_PORTDUINO
#include "platform/portduino/PortduinoGlue.h"
#endif
@ -273,7 +273,7 @@ int32_t ButtonThread::runOnce()
// Forward single press to InputBroker (but NOT as DOWN/SELECT, just forward a "button press" event)
if (inputBroker) {
InputEvent evt = { "button", INPUT_BROKER_MSG_BUTTON_PRESSED, 0, 0, 0 };
InputEvent evt = {"button", INPUT_BROKER_MSG_BUTTON_PRESSED, 0, 0, 0};
inputBroker->injectInputEvent(&evt);
}
@ -291,7 +291,7 @@ int32_t ButtonThread::runOnce()
// Forward long press to InputBroker (but NOT as DOWN/SELECT, just forward a "button long press" event)
if (inputBroker) {
InputEvent evt = { "button", INPUT_BROKER_MSG_BUTTON_LONG_PRESSED, 0, 0, 0 };
InputEvent evt = {"button", INPUT_BROKER_MSG_BUTTON_LONG_PRESSED, 0, 0, 0};
inputBroker->injectInputEvent(&evt);
}

View File

@ -9,12 +9,12 @@
#endif
#ifdef HAS_SCREEN
#undef BUTTON_LONGPRESS_MS
#define BUTTON_LONGPRESS_MS 500
#undef BUTTON_LONGPRESS_MS
#define BUTTON_LONGPRESS_MS 500
#else
#ifndef BUTTON_LONGPRESS_MS
#define BUTTON_LONGPRESS_MS 5000
#endif
#ifndef BUTTON_LONGPRESS_MS
#define BUTTON_LONGPRESS_MS 5000
#endif
#endif
#ifndef BUTTON_TOUCH_MS