mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-29 04:25:50 +00:00
fix the code format by use trunk
Signed-off-by: imliubo <imliubo@makingfun.xyz>
This commit is contained in:
parent
a981ea5440
commit
3729635ef5
@ -380,10 +380,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);
|
||||
|
||||
@ -447,7 +449,6 @@ void ScreenTouch(){
|
||||
LOG_INFO("Flick Start Detected\n");
|
||||
M5.Speaker.tone(1000, 100);
|
||||
powerFSM.trigger(EVENT_PRESS);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -956,7 +956,8 @@ bool deltaToTimestamp(uint32_t secondsAgo, uint8_t *hours, uint8_t *minutes, int
|
||||
validCached = true;
|
||||
return validCached;
|
||||
}
|
||||
static void drawLoraMessage(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y){
|
||||
static void drawLoraMessage(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y)
|
||||
{
|
||||
display->drawString(x + 0, y + 0, myRegion->name);
|
||||
display->setFont(FONT_MEDIUM);
|
||||
display->drawString(x + 10, y + 30, "channel: " + String(DataRegion.lora_channel_num + 1));
|
||||
|
@ -747,7 +747,8 @@ void TFTDisplay::sendCommand(uint8_t com)
|
||||
unphone.backlight(true); // using unPhone library
|
||||
#endif
|
||||
#ifdef RAK14014
|
||||
#elif !defined(M5STACK) && !defined(ST7789_CS) && !defined(M5STACK_COREBASIC) && !defined(M5STACK_CORE2)// T-Deck gets brightness set in Screen.cpp in the handleSetOn function
|
||||
#elif !defined(M5STACK) && !defined(ST7789_CS) && !defined(M5STACK_COREBASIC) && \
|
||||
!defined(M5STACK_CORE2) // T-Deck gets brightness set in Screen.cpp in the handleSetOn function
|
||||
tft->setBrightness(172);
|
||||
#endif
|
||||
break;
|
||||
|
@ -115,7 +115,6 @@ AccelerometerThread *accelerometerThread = nullptr;
|
||||
AudioThread *audioThread = nullptr;
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(TCXO_OPTIONAL)
|
||||
float tcxoVoltage = SX126X_DIO3_TCXO_VOLTAGE; // if TCXO is optional, put this here so it can be changed further down.
|
||||
#endif
|
||||
@ -1234,6 +1233,5 @@ void loop()
|
||||
#if defined(M5STACK_CORE2)
|
||||
ScreenTouch();
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -39,7 +39,6 @@ extern bool pmu_found;
|
||||
extern bool isCharging;
|
||||
extern bool isUSBPowered;
|
||||
|
||||
|
||||
struct DataInfo {
|
||||
int lora_channel_num;
|
||||
double lora_freq;
|
||||
|
@ -1,6 +1,5 @@
|
||||
// #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
|
||||
|
@ -35,7 +35,6 @@
|
||||
#define GPS_RX_PIN 16
|
||||
#define GPS_TX_PIN 17
|
||||
|
||||
|
||||
// Note: If you use corebasic version 2.7 or later,
|
||||
// you need to go to the src>graphics>TFTDisplay.cpp file to change the value of cfg.invert,
|
||||
// this one is to set the color inversion
|
||||
|
Loading…
Reference in New Issue
Block a user