Skip to content

fix(board): Update variant.cpp for senseBox MCU-S2 ESP32-S2 #11532

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 2, 2025
Prev Previous commit
ci(pre-commit): Apply automatic fixes
  • Loading branch information
pre-commit-ci-lite[bot] authored Jul 2, 2025
commit 031a9fa957bf402e058a8d34ebf16bb9a31432a8
22 changes: 11 additions & 11 deletions variants/sensebox_mcu_esp32s2/APOTA.ino
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ void IRAM_ATTR handleButtonPress() {

// Debounce: If the current press is too close to the last one, ignore it
if (currentTime - lastPressTime > 50) {
pressCount++; // Count the button press
pressCount++; // Count the button press

// Check if this is the second press within the double-press interval
if (pressCount == 2 && (currentTime - lastPressTime <= doublePressInterval)) {
Expand Down Expand Up @@ -112,12 +112,12 @@ void displayStatusBar(int progress) {
display.setCursor(22, 22);
display.println("hochgeladen!");

display.fillRect(0, SCREEN_HEIGHT - 24, SCREEN_WIDTH-4, 8, BLACK); // Clear status bar area
display.drawRect(0, SCREEN_HEIGHT - 24, SCREEN_WIDTH-4, 8, WHITE); // Draw border
int filledWidth = (progress * SCREEN_WIDTH-4) / 100; // Calculate progress width
display.fillRect(1, SCREEN_HEIGHT - 23, filledWidth-4, 6, WHITE); // Fill progress bar
display.fillRect(0, SCREEN_HEIGHT - 24, SCREEN_WIDTH - 4, 8, BLACK); // Clear status bar area
display.drawRect(0, SCREEN_HEIGHT - 24, SCREEN_WIDTH - 4, 8, WHITE); // Draw border
int filledWidth = (progress * SCREEN_WIDTH - 4) / 100; // Calculate progress width
display.fillRect(1, SCREEN_HEIGHT - 23, filledWidth - 4, 6, WHITE); // Fill progress bar

display.setCursor((SCREEN_WIDTH/2)-12, SCREEN_HEIGHT - 10);
display.setCursor((SCREEN_WIDTH / 2) - 12, SCREEN_HEIGHT - 10);
display.setTextSize(1);
display.setTextColor(WHITE, BLACK);
display.print(progress);
Expand All @@ -135,9 +135,9 @@ void displayWelcomeScreen() {
display.setCursor(40, 13);
display.setTextSize(1);
display.setTextColor(WHITE, BLACK);
display.println("Verbinde dich"); // "Connect"
display.println("Verbinde dich"); // "Connect"
display.setCursor(60, 27);
display.println("mit:"); // "with"
display.println("mit:"); // "with"

// Display SSID
display.setCursor(40, 43);
Expand All @@ -157,9 +157,9 @@ void displaySuccessScreen() {
display.setCursor(48, 22);
display.setTextSize(1);
display.setTextColor(WHITE, BLACK);
display.println("Erfolgreich"); // "Successfully"
display.println("Erfolgreich"); // "Successfully"
display.setCursor(48, 36);
display.println("hochgeladen!"); // "uploaded!"
display.println("hochgeladen!"); // "uploaded!"

display.display();
}
Expand Down Expand Up @@ -267,7 +267,7 @@ void loop() {
#endif

if (doublePressDetected) {
Serial.println("Doppeldruck erkannt!"); // "Double press detected!"
Serial.println("Doppeldruck erkannt!"); // "Double press detected!"
setBootPartitionToOTA0();
#ifdef DISPLAY_ENABLED
display.setCursor(0, 0);
Expand Down