mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-05 19:19:18 +00:00
trunk fmt
This commit is contained in:
parent
551ff1df7b
commit
ac912c9bf9
@ -165,7 +165,8 @@ int32_t ButtonThread::runOnce()
|
||||
LOG_BUTTON("Mulitipress! %hux", multipressClickCount);
|
||||
switch (multipressClickCount) {
|
||||
#if HAS_GPS
|
||||
#ifndef RAK14014 //The power supply of the GPS of RAK14014 cannot be turned off. Once turned off, the screen will not be used,They are the same power source
|
||||
#ifndef RAK14014 // The power supply of the GPS of RAK14014 cannot be turned off. Once turned off, the screen will not be
|
||||
// used,They are the same power source
|
||||
// 3 clicks: toggle GPS
|
||||
case 3:
|
||||
if (!config.device.disable_triple_click && (gps != nullptr)) {
|
||||
@ -174,7 +175,7 @@ int32_t ButtonThread::runOnce()
|
||||
screen->forceDisplay(true); // Force a new UI frame, then force an EInk update
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#if defined(USE_EINK) && defined(PIN_EINK_EN) // i.e. T-Echo
|
||||
// 4 clicks: toggle backlight
|
||||
|
@ -109,20 +109,18 @@ int32_t TouchScreenBase::runOnce()
|
||||
#if defined RAK14014
|
||||
// Speed up the processing speed of the keyboard in virtual keyboard mode
|
||||
auto state = cannedMessageModule->getRunState();
|
||||
if ( state == CANNED_MESSAGE_RUN_STATE_FREETEXT ) {
|
||||
if(_tapped)
|
||||
{
|
||||
if (state == CANNED_MESSAGE_RUN_STATE_FREETEXT) {
|
||||
if (_tapped) {
|
||||
_tapped = false;
|
||||
e.touchEvent = static_cast<char>(TOUCH_ACTION_TAP);
|
||||
LOG_DEBUG("action TAP(%d/%d)\n", _last_x, _last_y);
|
||||
}
|
||||
} else
|
||||
{
|
||||
if (_tapped && (time_t(millis()) - _start) > TIME_LONG_PRESS - 50) {
|
||||
}
|
||||
} else {
|
||||
if (_tapped && (time_t(millis()) - _start) > TIME_LONG_PRESS - 50) {
|
||||
_tapped = false;
|
||||
e.touchEvent = static_cast<char>(TOUCH_ACTION_TAP);
|
||||
LOG_DEBUG("action TAP(%d/%d)\n", _last_x, _last_y);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
// fire TAP event when no 2nd tap occured within time
|
||||
@ -131,7 +129,7 @@ int32_t TouchScreenBase::runOnce()
|
||||
e.touchEvent = static_cast<char>(TOUCH_ACTION_TAP);
|
||||
LOG_DEBUG("action TAP(%d/%d)", _last_x, _last_y);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// fire LONG_PRESS event without the need for release
|
||||
if (touched && (time_t(millis()) - _start) > TIME_LONG_PRESS) {
|
||||
|
@ -325,9 +325,9 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
||||
|
||||
this->shift = !this->shift;
|
||||
} else if (keyTapped == "⌫") {
|
||||
#ifndef RAK14014
|
||||
#ifndef RAK14014
|
||||
this->highlight = keyTapped[0];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
this->payload = 0x08;
|
||||
|
||||
@ -343,10 +343,10 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
||||
|
||||
validEvent = true;
|
||||
} else if (keyTapped == " ") {
|
||||
#ifndef RAK14014
|
||||
#ifndef RAK14014
|
||||
this->highlight = keyTapped[0];
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
this->payload = keyTapped[0];
|
||||
|
||||
validEvent = true;
|
||||
@ -365,9 +365,9 @@ int CannedMessageModule::handleInputEvent(const InputEvent *event)
|
||||
|
||||
this->shift = false;
|
||||
} else if (keyTapped != "") {
|
||||
#ifndef RAK14014
|
||||
#ifndef RAK14014
|
||||
this->highlight = keyTapped[0];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
this->payload = this->shift ? keyTapped[0] : std::tolower(keyTapped[0]);
|
||||
|
||||
@ -836,9 +836,8 @@ void CannedMessageModule::drawKeyboard(OLEDDisplay *display, OLEDDisplayUiState
|
||||
|
||||
Letter updatedLetter = {letter.character, letter.width, xOffset, yOffset, cellWidth, cellHeight};
|
||||
|
||||
#ifdef RAK14014 //Optimize the touch range of the virtual keyboard in the bottom row
|
||||
if(outerIndex == outerSize - 1)
|
||||
{
|
||||
#ifdef RAK14014 // Optimize the touch range of the virtual keyboard in the bottom row
|
||||
if (outerIndex == outerSize - 1) {
|
||||
updatedLetter.rectHeight = 240 - yOffset;
|
||||
}
|
||||
#endif
|
||||
|
@ -69,9 +69,7 @@ class CannedMessageModule : public SinglePortModule, public Observable<const UIF
|
||||
String drawWithCursor(String text, int cursor);
|
||||
|
||||
#ifdef RAK14014
|
||||
cannedMessageModuleRunState getRunState() const {
|
||||
return runState;
|
||||
}
|
||||
cannedMessageModuleRunState getRunState() const { return runState; }
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user