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
unsigned long touch_start_time; // Touch start time
bool is_touching = false; // Mark whether you are currently touching
void ScreenTouch(){
void ScreenTouch()
{
M5.update();
auto count = M5.Touch.getCount();
if (count == 0) return;
if (count == 0)
return;
for (std::size_t i = 0; i < count; ++i) {
auto t = M5.Touch.getDetail(i);
@ -360,7 +362,7 @@ void ScreenTouch(){
is_touching = true; // Set to touch
}
//Check the current touch status
// Check the current touch status
if (is_touching) {
unsigned long duration = millis() - touch_start_time;
if (duration >= LONG_PRESS_THRESHOLD) {
@ -414,7 +416,6 @@ void ScreenTouch(){
LOG_INFO("Flick Start Detected\n");
M5.Speaker.tone(1000, 100);
powerFSM.trigger(EVENT_PRESS);
}
}
}

View File

@ -71,8 +71,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define OLED_BLACK OLEDDISPLAY_COLOR::BLACK
#define OLED_WHITE OLEDDISPLAY_COLOR::WHITE
#else
#define OLED_BLACK BLACK
#define OLED_WHITE WHITE
#define OLED_BLACK BLACK
#define OLED_WHITE WHITE
#endif
using namespace meshtastic; /** @todo remove */

View File

@ -732,7 +732,8 @@ void TFTDisplay::sendCommand(uint8_t com)
unphone.backlight(true); // using unPhone library
#endif
#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);
#endif
break;

View File

@ -1,14 +1,13 @@
// #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 0
#define BUTTON_NEED_PULLUP
// #define EXT_NOTIFY_OUT 13 // Default pin to use for Ext Notify Plugin.
//#define BUTTON_PIN
// #define BUTTON_PIN
//#define PIN_BUZZER 25
// #define PIN_BUZZER 25
#undef LORA_SCK
#undef LORA_MISO
#undef LORA_MOSI
@ -17,7 +16,7 @@
#define LORA_SCK 18
#define LORA_MISO 38
#define LORA_MOSI 23
#define LORA_CS 33 //NSS
#define LORA_CS 33 // NSS
#define USE_RF95
#define LORA_DIO0 35 // IRQ
@ -40,5 +39,5 @@
// LCD screens are slow, so slowdown the wipe so it looks better
#define SCREEN_TRANSITION_FRAMERATE 30 // fps
// Picomputer gets a white on black display
#define TFT_MESH COLOR565 (0xA0, 0xFF, 0x00)//(0x94, 0xEA, 0x67)
#define TFT_MESH COLOR565(0xA0, 0xFF, 0x00) //(0x94, 0xEA, 0x67)
#define ILI9341_SPI_HOST VSPI_HOST // VSPI_HOST or HSPI_HOST