trunk fmt

This commit is contained in:
Daniel Cao 2024-11-08 16:55:09 +08:00 committed by Tom Fifield
parent 551ff1df7b
commit ac912c9bf9
4 changed files with 20 additions and 24 deletions

View File

@ -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 usedThey 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
// usedThey are the same power source
// 3 clicks: toggle GPS
case 3:
if (!config.device.disable_triple_click && (gps != nullptr)) {

View File

@ -110,14 +110,12 @@ int32_t TouchScreenBase::runOnce()
// 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 (_tapped) {
_tapped = false;
e.touchEvent = static_cast<char>(TOUCH_ACTION_TAP);
LOG_DEBUG("action TAP(%d/%d)\n", _last_x, _last_y);
}
} else
{
} else {
if (_tapped && (time_t(millis()) - _start) > TIME_LONG_PRESS - 50) {
_tapped = false;
e.touchEvent = static_cast<char>(TOUCH_ACTION_TAP);

View File

@ -837,8 +837,7 @@ 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)
{
if (outerIndex == outerSize - 1) {
updatedLetter.rectHeight = 240 - yOffset;
}
#endif

View File

@ -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
/*