C
Finalize version 1.3.0 interactions
YU CHIH CHANGd05292da3782
diff --git a/README.md b/README.mdindex 570e30f..698948d 100644--- a/README.md+++ b/README.md@@ -77,7 +77,7 @@ One firmware includes three dashboard themes with the same live GT7 telemetry fe- **Classic** — the original engineering-style five-column dashboard.- **Retro** — a warm paper-colored instrument panel with dark text and restrained accents.-Press and hold the display for 2 seconds, choose **SELECT THEME**, then select a theme. The selection is saved by enum value and restored after reboot. Resetting Wi-Fi does not reset the selected theme.+While the display is active, tap it once, choose **SELECT THEME**, then select a theme. The selection is saved by enum value and restored after reboot. Resetting Wi-Fi does not reset the selected theme.<p align="center"><img src="photos/1.25and1.26_en.png" width="900" alt="Comparison of GT7 Dashboard firmware versions 1.2.5 and 1.2.6">@@ -150,11 +150,8 @@ No IP address configuration is required.**Tap**-- Wake the display when it is asleep. Tapping an active display does nothing.--**Press and Hold (2 sec)**--- Open Settings.+- Open Settings while the display is active.+- Wake the display when it is asleep; the first tap does not also open Settings.- Select and save the Classic, GT3, or Retro dashboard theme.- Reset saved Wi-Fi through a separate confirmation screen.diff --git a/README.zh-TW.md b/README.zh-TW.mdindex 2d5ade3..026fc49 100644--- a/README.zh-TW.md+++ b/README.zh-TW.md@@ -78,7 +78,7 @@- **Classic** — 原本偏工程風格的五欄儀表板。- **Retro** — 暖色紙張底、深色文字與低調提示色的復古儀表板。-長按螢幕 2 秒,選擇 **SELECT THEME**,再選取需要的主題。主題會以固定 enum 值儲存並在重新開機後恢復;重設 Wi-Fi 不會清除主題設定。+螢幕亮起時點一下,選擇 **SELECT THEME**,再選取需要的主題。主題會以固定 enum 值儲存並在重新開機後恢復;重設 Wi-Fi 不會清除主題設定。<p align="center"><img src="photos/1.25and1.26_cht.png" width="900" alt="GT7 Dashboard 韌體 1.2.5 與 1.2.6 外觀比較">@@ -146,11 +146,8 @@ http://192.168.4.1**點一下**-- 螢幕休眠時喚醒顯示;亮屏時點一下不會執行動作。--**長按(2 秒)**--- 開啟設定選單。+- 螢幕亮起時開啟設定選單。+- 螢幕休眠時只喚醒顯示,第一次點擊不會同時進入設定。- 選擇並儲存 Classic、GT3 或 Retro 儀表主題。- 透過獨立確認畫面重設已儲存的 Wi-Fi。diff --git a/docs/THEME_DEVELOPMENT.md b/docs/THEME_DEVELOPMENT.mdindex 9d954e0..2827ecb 100644--- a/docs/THEME_DEVELOPMENT.md+++ b/docs/THEME_DEVELOPMENT.md@@ -103,7 +103,7 @@ For each display controller, verify:- saved theme restoration after power cycling- Settings Back and timeout behavior- Wi-Fi reset Cancel and confirmation-- automatic sleep and tap-to-wake+- automatic sleep, tap-to-wake and active-screen tap-to-Settings behavior- no visible flicker in high-frequency fields- no watchdog reset or obvious heap degradation during a driving sessiondiff --git a/docs/THEME_SWITCH_PLAN.md b/docs/THEME_SWITCH_PLAN.mdindex 53e7004..284955b 100644--- a/docs/THEME_SWITCH_PLAN.md+++ b/docs/THEME_SWITCH_PLAN.md@@ -289,7 +289,7 @@ Pass conditions:- [ ] The entry press cannot accidentally activate the first menu item.- [ ] All buttons can be tapped comfortably without touchscreen calibration.- [ ] A visual pressed state identifies the button being activated.-- [ ] Holding or slowly releasing a touch produces only one action.+- [x] Tapping and releasing produces only one action.- [ ] Theme Selection lists Classic, GT3 and Retro and marks the active choice.- [ ] Selecting each theme saves it and returns to the corresponding renderer or placeholder.- [ ] Power cycling restores the last selected theme.diff --git a/installer/firmware/firmware-ili9341.bin b/installer/firmware/firmware-ili9341.binindex f113b97..f11f37f 100644Binary files a/installer/firmware/firmware-ili9341.bin and b/installer/firmware/firmware-ili9341.bin differdiff --git a/installer/firmware/firmware-st7789.bin b/installer/firmware/firmware-st7789.binindex fe3045b..4d1cd26 100644Binary files a/installer/firmware/firmware-st7789.bin and b/installer/firmware/firmware-st7789.bin differdiff --git a/installer/release-notes.json b/installer/release-notes.jsonindex 7cf8288..2dbddb2 100644--- a/installer/release-notes.json+++ b/installer/release-notes.json@@ -1,7 +1,8 @@{"1.3.0": ["Added switchable GT3, Classic, and Retro dashboard themes with persistent on-device selection; GT3 remains the default.",- "Added the touch Settings menu and changed short tap behavior to wake-only."+ "Added the touch Settings menu: tap an active display to open Settings, or tap a sleeping display to wake it.",+ "Refined the Classic min-alert RPM marker and increased Retro gear readability."],"1.2.7": ["Added telemetry-driven RPM colours and progressive GT7 shift-warning pulse."diff --git a/installer/releases.json b/installer/releases.jsonindex a6aed35..2b42761 100644--- a/installer/releases.json+++ b/installer/releases.json@@ -4,7 +4,8 @@"version": "1.3.0","notes": ["Added switchable GT3, Classic, and Retro dashboard themes with persistent on-device selection; GT3 remains the default.",- "Added the touch Settings menu and changed short tap behavior to wake-only."+ "Added the touch Settings menu: tap an active display to open Settings, or tap a sleeping display to wake it.",+ "Refined the Classic min-alert RPM marker and increased Retro gear readability."],"manifests": {"ili9341": "versions/1.3.0/manifest-ili9341.json",diff --git a/installer/versions/1.3.0/firmware-ili9341.bin b/installer/versions/1.3.0/firmware-ili9341.binindex f113b97..f11f37f 100644Binary files a/installer/versions/1.3.0/firmware-ili9341.bin and b/installer/versions/1.3.0/firmware-ili9341.bin differdiff --git a/installer/versions/1.3.0/firmware-st7789.bin b/installer/versions/1.3.0/firmware-st7789.binindex fe3045b..4d1cd26 100644Binary files a/installer/versions/1.3.0/firmware-st7789.bin and b/installer/versions/1.3.0/firmware-st7789.bin differdiff --git a/src/SHCustomProtocol.h b/src/SHCustomProtocol.hindex 9aba9c5..07f0e3b 100644--- a/src/SHCustomProtocol.h+++ b/src/SHCustomProtocol.h@@ -283,7 +283,6 @@ private:WifiResetConfirmation,};- static constexpr unsigned long SETTINGS_HOLD_MS = 2000UL;static constexpr unsigned long SETTINGS_TIMEOUT_MS = 15000UL;SettingsScreen settingsScreen = SettingsScreen::Closed;unsigned long settingsLastInteractionTime = 0;@@ -1307,7 +1306,7 @@ public:drawRetroTextValueBuffered(7, 77, 84, 62, state.speed, "retroSpeed", ink,7, MC_DATUM, forceUpdate, speedSprite, speedSpriteCreated, 0.72f, 0.82f);drawRetroTextValue(104, 76, 74, 72, state.gear, "retroGear", ink,- 7, MC_DATUM, forceUpdate, 1.05f, 1.08f);+ 7, MC_DATUM, forceUpdate, 1.20f, 1.22f);// Keep labels and values on separate rows. Fractionally scaled bitmap fonts// produced malformed glyphs on the 2.8-inch panel, so Retro uses native sizes.@@ -1430,15 +1429,8 @@ public:barHeight,tft.color565(28, 28, 28));- char text[40];- snprintf(- text,- sizeof(text),- "Touch & hold %lus for settings",- static_cast<unsigned long>(SETTINGS_HOLD_MS / 1000UL));-tft.drawCentreString(- text,+ "Tap for settings",SCREEN_WIDTH / 2,SCREEN_HEIGHT - 26,1);@@ -2530,17 +2522,25 @@ public:const int segmentWidth =(innerWidth - totalGapWidth) / segmentCount;+ const int markerX = rpmAlertRangeValid+ ? innerX + lroundf((innerWidth - 1) *+ constrain(rpmRedLineSetting / 100.0f, 0.0f, 1.0f))+ : -1;+ const int previousMarkerX = prevData["classicMinAlertMarkerX"].toInt();+ const bool markerChanged = markerX != previousMarkerX;+ const bool fullRedraw = forceUpdate || markerChanged;+/** 首次繪製或切回主畫面時:* 清一次內部,再完整畫出目前的 Bar。*/- if (forceUpdate)+ if (fullRedraw){tft.fillRect(- innerX,- innerY,- innerWidth,- innerHeight,+ x,+ y,+ width,+ frameHeight + 10,TFT_BLACK);previousActiveSegments = 0;@@ -2628,7 +2628,19 @@ public:* 例如 51% → 54% 都是同樣格數,畫面完全不更新。*/+ if (markerX >= 0)+ {+ const uint16_t markerColor = tft.color565(255, 52, 42);+ const int arrowTipY = y + frameHeight + 1;+ tft.drawFastVLine(markerX, y, arrowTipY - y + 1, markerColor);+ tft.fillTriangle(markerX, arrowTipY,+ markerX - 6, y + frameHeight + 9,+ markerX + 6, y + frameHeight + 9,+ markerColor);+ }+prev_rpmPercent = safeRpmPercent;+ prevData["classicMinAlertMarkerX"] = String(markerX);}void drawRpmMeter2(int32_t x, int32_t y, int width, int height)@@ -3628,9 +3640,7 @@ public:}static bool wasTouched = false;- static bool longPressTriggered = false;static bool waitForReleaseAfterScreenChange = false;- static unsigned long touchStartTime = 0;const bool isTouched = tft.getTouch(&touchX, &touchY);if (waitForReleaseAfterScreenChange)@@ -3681,23 +3691,7 @@ public:return;}- if (isTouched && !wasTouched)- {- touchStartTime = millis();- longPressTriggered = false;- }-- if (isTouched && !longPressTriggered &&- millis() - touchStartTime >= SETTINGS_HOLD_MS)- {- longPressTriggered = true;- showSettingsScreen(SettingsScreen::Main);- waitForReleaseAfterScreenChange = true;- wasTouched = isTouched;- return;- }-- if (!isTouched && wasTouched && !longPressTriggered)+ if (!isTouched && wasTouched){if (screenSleeping){@@ -3715,9 +3709,11 @@ public:gameStoppedTimerStarted = false;}}- // While the display is active, a short tap intentionally does nothing.- // This prevents an attempted Settings long-press from turning the screen- // off when the user releases slightly before the hold threshold.+ else+ {+ showSettingsScreen(SettingsScreen::Main);+ waitForReleaseAfterScreenChange = true;+ }}wasTouched = isTouched;