Skip to content

Commit

Permalink
Fix CYD start and Core2/S3 debounce
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorcelli committed Jan 3, 2025
1 parent d1e9728 commit 51d2cd9
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 25 deletions.
9 changes: 0 additions & 9 deletions boards/CYD-2432S028/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,6 @@ void _post_setup_gpio() {
ledcWrite(TFT_BRIGHT_CHANNEL,255);
}


/***************************************************************************************
** Function name: getBattery()
** location: display.cpp
** Description: Delivers the battery value from 1-100
***************************************************************************************/
int getBattery() { }


/*********************************************************************
** Function: setBrightness
** location: settings.cpp
Expand Down
8 changes: 7 additions & 1 deletion boards/m5stack-core2/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,13 @@ void InputHandler(void) {
END:
if(AnyKeyPress) {
long tmp=millis();
while((millis()-tmp)<200 && t.isHolding());
M5.update();
t = M5.Touch.getDetail();
while((millis()-tmp)<200 && (t.isPressed() || t.isHolding())) {
M5.update();
t = M5.Touch.getDetail();
delay(10);
}
}
}

Expand Down
8 changes: 7 additions & 1 deletion boards/m5stack-cores3/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,13 @@ void InputHandler(void) {
END:
if(AnyKeyPress) {
long tmp=millis();
while((millis()-tmp)<200 && t.isHolding());
M5.update();
t = M5.Touch.getDetail();
while((millis()-tmp)<200 && (t.isPressed() || t.isHolding())) {
M5.update();
t = M5.Touch.getDetail();
delay(10);
}
}
}

Expand Down
3 changes: 1 addition & 2 deletions custom_4Mb.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x6000,
app0, app, ota_0, 0x10000, 0x260000,
spiffs, data, spiffs, 0x270000,0x180000,
coredump, data, coredump,0x3F0000,0x10000,
spiffs, data, spiffs, 0x270000,0x190000,
5 changes: 2 additions & 3 deletions custom_4Mb_full.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x6000,
app0, app, ota_0, 0x10000, 0x370000,
spiffs, data, spiffs, 0x380000,0x70000,
coredump, data, coredump,0x3F0000,0x10000,
app0, app, ota_0, 0x10000, 0x380000,
spiffs, data, spiffs, 0x390000,0x70000,
11 changes: 2 additions & 9 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,15 @@ MainMenu mainMenu;
SPIClass sdcardSPI;
SPIClass CC_NRF_SPI;

// Navigation Variables
volatile bool NextPress=false;

volatile bool PrevPress=false;

volatile bool UpPress=false;

volatile bool DownPress=false;

volatile bool SelPress=false;

volatile bool EscPress=false;

volatile bool AnyKeyPress=false;

volatile bool NextPagePress=false;

volatile bool PrevPagePress=false;

TouchPoint touchPoint;
Expand Down Expand Up @@ -355,7 +348,7 @@ void setup() {
#endif

delay(200);
previousMillis = millis();
wakeUpScreen();

if (bruceConfig.startupApp != "" && !startupApp.startApp(bruceConfig.startupApp)) {
bruceConfig.setStartupApp("");
Expand Down

0 comments on commit 51d2cd9

Please sign in to comment.