Autoformat

This commit is contained in:
Ludovic BOUÉ 2024-10-13 21:05:15 +00:00
parent f6c019c948
commit 27a0d03ab6
4 changed files with 35 additions and 34 deletions

View File

@ -347,10 +347,12 @@ unsigned long lastClickTime = 0; // The time of the last click
int clickCount = 0; // Click count int clickCount = 0; // Click count
unsigned long touch_start_time; // Touch start time unsigned long touch_start_time; // Touch start time
bool is_touching = false; // Mark whether you are currently touching bool is_touching = false; // Mark whether you are currently touching
void ScreenTouch(){ void ScreenTouch()
{
M5.update(); M5.update();
auto count = M5.Touch.getCount(); auto count = M5.Touch.getCount();
if (count == 0) return; if (count == 0)
return;
for (std::size_t i = 0; i < count; ++i) { for (std::size_t i = 0; i < count; ++i) {
auto t = M5.Touch.getDetail(i); auto t = M5.Touch.getDetail(i);
@ -414,7 +416,6 @@ void ScreenTouch(){
LOG_INFO("Flick Start Detected\n"); LOG_INFO("Flick Start Detected\n");
M5.Speaker.tone(1000, 100); M5.Speaker.tone(1000, 100);
powerFSM.trigger(EVENT_PRESS); powerFSM.trigger(EVENT_PRESS);
} }
} }
} }

View File

@ -732,7 +732,8 @@ void TFTDisplay::sendCommand(uint8_t com)
unphone.backlight(true); // using unPhone library unphone.backlight(true); // using unPhone library
#endif #endif
#ifdef RAK14014 #ifdef RAK14014
#elif !defined(M5STACK) && !defined(ST7789_CS) && !defined(M5STACK_CORE2) // T-Deck gets brightness set in Screen.cpp in the handleSetOn function #elif !defined(M5STACK) && !defined(ST7789_CS) && \
!defined(M5STACK_CORE2) // T-Deck gets brightness set in Screen.cpp in the handleSetOn function
tft->setBrightness(172); tft->setBrightness(172);
#endif #endif
break; break;

View File

@ -1,6 +1,5 @@
// #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep // #define BUTTON_NEED_PULLUP // if set we need to turn on the internal CPU pullup during sleep
// #define BUTTON_PIN 39 // 38, 37 // #define BUTTON_PIN 39 // 38, 37
// #define BUTTON_PIN 0 // #define BUTTON_PIN 0
#define BUTTON_NEED_PULLUP #define BUTTON_NEED_PULLUP