Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorcelli committed Nov 26, 2024
1 parent a50bb89 commit 68114da
Show file tree
Hide file tree
Showing 16 changed files with 25 additions and 31 deletions.
2 changes: 1 addition & 1 deletion lib/Unified/M5Unified.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ for (int i = 0; i < 0x50; ++i)
while (--i >= 0)
{
auto raw = Touch.getTouchPointRaw(i);
if (raw.y > 220) //240 - 20 para a margem inferior onde estão os botoes
if (raw.y > 220) //240 - 20 to bottom margin where buttons are placed
{
auto det = Touch.getDetail(i);
if (det.state & touch_state_t::touch)
Expand Down
1 change: 0 additions & 1 deletion ports/CYD-2432S028/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ bool checkEscPress() {
delay(200);
return false;
}
returnToMenu=true;
return true;
}
else { return false; }
Expand Down
1 change: 0 additions & 1 deletion ports/lilygo-t-deck/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ bool checkEscPress(){
delay(200);
return false;
}
returnToMenu=true;
return true;
}
else { return false; }
Expand Down
1 change: 0 additions & 1 deletion ports/lilygo-t-display-s3-touch/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ bool checkEscPress(){
delay(200);
return false;
}
returnToMenu=true;
return true;
}
else { return false; }
Expand Down
1 change: 0 additions & 1 deletion ports/lilygo-t-embed-cc1101/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ bool checkEscPress(){
delay(200);
return false;
}
returnToMenu=true;
return true;
}
else
Expand Down
1 change: 0 additions & 1 deletion ports/m5stack-core/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ bool checkEscPress(){
delay(200);
return false;
}
returnToMenu=true;
return true;
}
else { return false; }
Expand Down
2 changes: 1 addition & 1 deletion ports/m5stack-core/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ build_flags =
-DDW_BTN=0
-DBTN_ALIAS='"Sel"'
-DWIDTH=320
-DHEIGHT=190 ;240 - 50 para a margem inferior
-DHEIGHT=220 ;240 - 20 para a margem inferior
-DLED=1
-DLED_ON=HIGH

Expand Down
2 changes: 1 addition & 1 deletion ports/m5stack-core2/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ bool checkEscPress(){
delay(200);
return false;
}
returnToMenu=true;
return true;
}
else { return false; }
Expand Down Expand Up @@ -417,6 +416,7 @@ String keyboard(String mytext, int maxSize, String msg) {

M5.update();
auto t = M5.Touch.getDetail();
if (t.wasClicked())
{
if (box_list[48].contain(t.x, t.y)) { break; } // Ok
if (box_list[49].contain(t.x, t.y)) { caps=!caps; tft.fillRect(0,54,WIDTH,HEIGHT-54,BGCOLOR); goto THIS_END; } // CAP
Expand Down
29 changes: 14 additions & 15 deletions ports/m5stack-core2/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ build_flags =
-DDW_BTN=0
-DBTN_ALIAS='"Sel"'
-DWIDTH=320
-DHEIGHT=190 ;240 - 50 para a margem inferior
-DHEIGHT=220 ;240 - 20 para a margem inferior
-DLED=1
-DLED_ON=HIGH

Expand All @@ -53,23 +53,22 @@ build_flags =

;TFT_eSPI Setup
-DUSER_SETUP_LOADED=1
-DST7789_2_DRIVER=1
-DTFT_RGB_ORDER=1
-DTFT_WIDTH=135
-DTFT_HEIGHT=240
-DTFT_BACKLIGHT_ON=1
-DILI9341_DRIVER=1
-DTFT_INVERSION_ON=1
-DM5STACK=1
-DTFT_WIDTH=240
-DTFT_HEIGHT=320
-DTFT_MISO=38
-DTFT_MOSI=23
-DTFT_SCLK=18
-DTFT_CS=5
-DTFT_DC=14
-DTFT_RST=12
-DTFT_DC=15
-DTFT_RST=-1
-DTFT_BL=-1
-DTOUCH_CS=-1
-DTFT_MOSI=15
-DTFT_SCLK=13
-DTFT_BL=27
-DSMOOTH_FONT=1
-DSPI_FREQUENCY=20000000
-DSPI_READ_FREQUENCY=20000000
-DSPI_TOUCH_FREQUENCY=2500000
-DM5STACK=1
-DSPI_FREQUENCY=40000000
-DSPI_READ_FREQUENCY=16000000


-DSDCARD_CS=4
Expand Down
1 change: 0 additions & 1 deletion ports/m5stack-cores3/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ bool checkEscPress(){
delay(200);
return false;
}
returnToMenu=true;
return true;
}
else { return false; }
Expand Down
2 changes: 1 addition & 1 deletion ports/m5stack-cores3/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ build_flags =
-DDW_BTN=0
-DBTN_ALIAS='"Sel"'
-DWIDTH=320
-DHEIGHT=190 ;240 - 50 para a margem inferior
-DHEIGHT=220 ;240 - 20 para a margem inferior
-DLED=1
-DLED_ON=HIGH

Expand Down
1 change: 0 additions & 1 deletion ports/m5stack-cplus1_1/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ bool checkEscPress(){
delay(200);
return false;
}
returnToMenu=true;
return true;
}
else { return false; }
Expand Down
1 change: 0 additions & 1 deletion ports/m5stack-cplus2/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ bool checkEscPress(){
delay(200);
return false;
}
returnToMenu=true;
return true;
}
else { return false; }
Expand Down
1 change: 0 additions & 1 deletion ports/marauder-mini/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ bool checkEscPress(){
delay(200);
return false;
}
returnToMenu=true;
return true;
}
else { return false; }
Expand Down
1 change: 0 additions & 1 deletion ports/marauder-v4og/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ bool checkEscPress(){
delay(200);
return false;
}
returnToMenu=true;
return true;
}
else { return false; }
Expand Down
9 changes: 7 additions & 2 deletions src/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ void loopVersions() {
options = {
{"OTA Install", [=]() { installFirmware(String(file), app_size, spiffs, spiffs_offset, spiffs_size, nb, fat, (uint32_t*)FAT_offset, (uint32_t*)FAT_size); }},
{"Download->SD", [=]() { downloadFirmware(String(file), String(name) + "." + String(version).substring(0,10), dwn_path); }},
{"Main Menu", [=]() { returnToMenu=true; }},
{"Back to List", [=]() { returnToMenu=true; }},
};
delay(200);

Expand Down Expand Up @@ -706,9 +706,14 @@ void loopFirmware(){
if((millis()-time)>150) tft.drawArc(WIDTH/2,HEIGHT/2,25,15,0,360*(millis()-time)/1000,ALCOLOR,BGCOLOR,false);
} // while pressed the btn, hold the code to count the time
if((millis()-time)>1000) break;// check how many ms it was kept held on and stop the loop if more than 250ms
else loopVersions(); // goes to the Version information
else {
loopVersions(); // goes to the Version information
returnToMenu=false;
}
#else
loopVersions();
returnToMenu=false;

#endif

delay(200);
Expand Down

0 comments on commit 68114da

Please sign in to comment.