C
release: publish firmware 2.0.0
YU CHIH CHANG132bf86d4948
diff --git a/README.md b/README.mdindex 1ee2465..87ade6d 100644--- a/README.md+++ b/README.md@@ -90,7 +90,7 @@ One firmware includes seven dashboard themes with the same live GT7 telemetry fe<img src="photos/theme_all.jpg" width="900" alt="Classic, GT3, Radar and Retro dashboard theme previews"></p>-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 or brightness.+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. Switching the telemetry connection does not reset the selected theme or brightness.---@@ -124,7 +124,7 @@ On a fresh device, complete Touch Setup first, then choose **DIRECT GT7** or **S- **SimHub USB:** Wi-Fi stays off. Connect a data-capable USB cable to the PC and follow [SimHub setup](SIMHUB_README.md).- **Direct GT7:** if no network is saved, the firmware opens Wi-Fi Setup automatically. Join **GT7-DASH-SETUP** on a phone, open **http://192.168.4.1**, choose the network shared with the PS5 and save.-The two connection paths are separate. Use **DEVICE SETTINGS → CHANGE CONNECTION** when moving between Direct GT7 and SimHub USB.+The two connection paths are separate. Switch directly from the Waiting screen, or select **DIRECT GT7** / **SIMHUB USB** in **DEVICE SETTINGS**.**RESET TO DEFAULT** clears Wi-Fi, connection, touch, theme and brightness settings, then returns to Touch Setup.@@ -134,9 +134,10 @@ All seven themes work with either source. Missing values show `--` or disable thTouch Setup runs before connection selection on a fresh device or after Reset to Default:-1. Tap the asymmetric target on the first screen so the firmware can detect orientation.-2. Tap the verification target.-3. Select **SAVE**, then choose Direct GT7 or SimHub USB.+1. Tap the target on the right so the firmware can detect orientation.+2. Tap the verification target on the left. The different position prevents an accidental double tap.+3. Select **SAVE**, or use **RETRY** if the detected direction is wrong.+4. Choose Direct GT7 or SimHub USB.An incomplete setup times out without saving, and incoming GT7 telemetry closes thesetup immediately so it never holds the dashboard open. If an incorrect orientation is@@ -155,7 +156,7 @@ saved, repeat the same procedure from the waiting screen to replace it.- Wake the display when it is asleep; the first tap does not also open Settings.- Select and save the Classic, GT3, Retro, Radar, Mono, Pocket, or Endurance dashboard theme.- Open **DEVICE SETTINGS** to adjust brightness from 20% to 100% in 10% steps.-- Switch transport under **DEVICE SETTINGS → CHANGE CONNECTION**, or clear all setup with **RESET TO DEFAULT**.+- Switch transport from the Waiting screen or directly under **DEVICE SETTINGS**, or clear all setup with **RESET TO DEFAULT**.Brightness defaults to 80%, is saved after adjustment, and is restored after reboot or wake. Automatic sleep still turns the backlight fully off.diff --git a/README.zh-TW.md b/README.zh-TW.mdindex d4c5954..17018bf 100644--- a/README.zh-TW.md+++ b/README.zh-TW.md@@ -92,7 +92,7 @@<img src="photos/theme_all.jpg" width="900" alt="Classic、GT3、Radar 與 Retro 四種儀表主題預覽"></p>-螢幕亮起時點一下,選擇 **SELECT THEME**,再選取需要的主題。主題會以固定 enum 值儲存並在重新開機後恢復;重設 Wi-Fi 不會清除主題或亮度設定。+螢幕亮起時點一下,選擇 **SELECT THEME**,再選取需要的主題。主題會以固定 enum 值儲存並在重新開機後恢復;切換 telemetry 連線不會清除主題或亮度設定。---@@ -127,7 +127,7 @@- **SIMHUB USB:** 只啟用 USB Custom Protocol,Wi-Fi 保持關閉。- **GT7:** 沒有網路或已儲存網路連線失敗時提供配網,依下方步驟設定。-兩條連線路徑彼此獨立。需要更換平台時,使用 **DEVICE SETTINGS → CHANGE CONNECTION**。+兩條連線路徑彼此獨立。可直接在 Waiting 畫面切換,或在 **DEVICE SETTINGS** 選擇 **DIRECT GT7**/**SIMHUB USB**。七個主題共用兩種來源,缺值顯示 `--` 或停用對應提示。GT7 專用推算不會套用到 SimHub。@@ -161,14 +161,12 @@ http://192.168.4.1### 觸控方向設定-如果畫面顯示正常,但觸控方向旋轉了,可在等待遙測畫面上方使用 **TOUCH SETUP**:+全新裝置或執行 **RESET TO DEFAULT** 後會先進入 Touch Setup:-1. 點一下 **TOUCH SETUP**,提示會變成 **TOUCH AGAIN**。-2. 在三秒內再次點擊相同的實體位置。-3. 進入 Touch Setup 後,點擊畫面上的測試靶以確認偵測到的方向。-4. 點擊 **SAVE** 儲存,或點擊 **CANCEL** 保留原本方向。--未完成的設定會逾時退出且不會儲存;收到 GT7 遙測資料時也會立即退出,不會卡住儀表畫面。如果誤存錯誤方向,只要回到等待畫面再次執行相同步驟即可覆蓋。+1. 點擊右側目標,讓韌體判斷觸控方向。+2. 點擊左側驗證目標;目標位置不同,可避免快速連點造成誤判。+3. 方向正確時點擊 **SAVE**,判斷錯誤則點擊 **RETRY** 回到第一步。+4. 選擇 Direct GT7 或 SimHub USB。---@@ -182,7 +180,7 @@ http://192.168.4.1- 螢幕休眠時只喚醒顯示,第一次點擊不會同時進入設定。- 選擇並儲存 Classic、GT3、Retro、Radar、Mono、Pocket 或 Endurance 儀表主題。- 進入 **DEVICE SETTINGS**,以 10% 級距調整 20%~100% 的亮度。-- **CHANGE CONNECTION** 可切換 Direct GT7/SimHub USB,保留其他設定。+- 可從 Waiting 畫面快速切換,也可直接在 **DEVICE SETTINGS** 選擇 Direct GT7/SimHub USB,其他設定會保留。- **RESET TO DEFAULT** 會清除 Wi-Fi、連線模式、觸控方向、主題與亮度,然後回到首次觸控設定。亮度預設為 80%,調整後會儲存,重新開機或喚醒時會恢復;自動休眠仍會完全關閉背光。diff --git a/SIMHUB_README.md b/SIMHUB_README.mdindex d39ccf5..be88836 100644--- a/SIMHUB_README.md+++ b/SIMHUB_README.md@@ -5,7 +5,7 @@ The dashboard supports **Direct GT7** over Wi-Fi and **SimHub USB** for PC games## 1. Prepare the dashboard1. Connect the dashboard to the PC with a data-capable USB cable.-2. Select **SIMHUB USB** on the dashboard. If it is currently in GT7 mode, open **Settings → Device Settings → Change Connection → SIMHUB USB**.+2. Select **SIMHUB USB** on the dashboard. From a Waiting screen, use **SWITCH TO SIMHUB USB** at the top; from Settings, open **Device Settings** and select **SIMHUB USB**.3. Close Arduino Serial Monitor, PlatformIO Serial Monitor, and any other application using the same COM port.## 2. Let SimHub detect the dashboard@@ -26,6 +26,8 @@ The initial connection uses 19200 baud and SimHub negotiates the later rate auto4. Select Apply or Save and verify that the protocol is enabled for the correct COM device.5. Do not append `\n`; SimHub adds the line ending automatically.+The formula editor's **Raw result** should begin with `DSH1;` and its second field should keep increasing, for example `DSH1;391;...`. This confirms that the formula is running. It does not by itself confirm that the correct COM device is receiving the data.+This uses SimHub's **Arduino Custom Protocol**, not the Custom Serial Devices plugin. Do not use SimHub's generic Arduino sketch upload because it would overwrite the dashboard firmware.## 4. Start the game@@ -39,14 +41,15 @@ If SimHub detects the device but the dashboard remains on Waiting:- **USB linked: set Custom Protocol**: USB and SimHub are linked, but no valid formula data has arrived. Enable **Use JavaScript**, paste the complete formula, and select Apply or Save.- **Check Custom Protocol (DSH1)**: the formula has the wrong format or version. Paste [simhub/custom-protocol.txt](simhub/custom-protocol.txt) again.- **Waiting for SimHub** remains: verify the data cable, selected COM port, serial-port ownership, and that SimHub is receiving live game data.+- Raw result starts with `DSH1;` and its sequence increases, but Waiting remains: confirm Custom Protocol is enabled for the same Arduino device and COM port shown as connected in SimHub.- Individual values show `--`: the current game may not expose those properties; other supported values still work.-- Fuel never changes: paste the latest [simhub/custom-protocol.txt](simhub/custom-protocol.txt) again. The formula prefers SimHub's live `FuelPercent` alias and calculates from fuel capacity when available.+- Fuel never changes: check the game's fuel-consumption setting and SimHub's `Fuel`, `FuelPercent`, and capacity properties. For example, 30 litres in a 64-litre tank correctly displays 47%; unlimited fuel will keep that value unchanged.- The firmware filters a brief neutral value during a gear change for 750 ms. A sustained or initial neutral still displays `N`.## Notes- All seven themes use the same formula. Changing themes does not require another SimHub setup.-- The current connection choice is saved. Use **Change Connection** to switch between Direct GT7 and SimHub USB.+- The current connection choice is saved. Switch directly from the Waiting screen, or select **DIRECT GT7** / **SIMHUB USB** in **Device Settings**.- **Reset to Default** clears Wi-Fi and all dashboard preferences, then restarts first-time setup.- Historical formulas elsewhere in the repository use an older packet format. For this firmware, use only [simhub/custom-protocol.txt](simhub/custom-protocol.txt).diff --git a/SIMHUB_README.zh-TW.md b/SIMHUB_README.zh-TW.mdindex d94f674..de64dd8 100644--- a/SIMHUB_README.zh-TW.md+++ b/SIMHUB_README.zh-TW.md@@ -5,7 +5,7 @@## 1. 準備儀表1. 使用可傳輸資料的 USB 線把儀表接到電腦。-2. 在儀表選擇 **SIMHUB USB**。若目前是 GT7 模式,開啟 **Settings → Device Settings → Change Connection → SIMHUB USB**。+2. 在儀表選擇 **SIMHUB USB**。若目前停在 Waiting 畫面,可點上方的 **SWITCH TO SIMHUB USB**;也可以進入 **Settings → Device Settings**,直接選擇 **SIMHUB USB**。3. 關閉 Arduino Serial Monitor、PlatformIO Serial Monitor,以及其他可能占用相同 COM 埠的程式。## 2. 讓 SimHub 偵測儀表@@ -24,7 +24,8 @@2. 啟用 **Use JavaScript**。3. 開啟 [simhub/custom-protocol.txt](simhub/custom-protocol.txt),複製檔案的**全部內容**並貼入公式欄位。4. 按下 Apply/Save,並確認 Custom Protocol 已啟用在正確的 COM 裝置上。-5. 不要自行在公式尾端加入 `\n`;SimHub 會自動送出換行。++公式編輯器的 **Raw result** 應以 `DSH1;` 開頭,而且第二欄序號會持續增加,例如 `DSH1;391;...`。這表示公式正在執行,但仍需確認資料送往正確的 Arduino 裝置與 COM 埠。這是 SimHub 的 **Arduino Custom Protocol**,不是 Custom Serial Devices 外掛。請勿使用 SimHub 的一般 Arduino sketch upload,否則會覆蓋本儀表韌體。@@ -39,14 +40,15 @@- **USB linked: set Custom Protocol**:USB 與 SimHub 已連線,但尚未收到有效公式資料。確認已啟用 **Use JavaScript**、貼入完整公式並按下 Apply/Save。- **Check Custom Protocol (DSH1)**:公式格式或版本不正確。重新貼入 [simhub/custom-protocol.txt](simhub/custom-protocol.txt)。- 一直顯示 **Waiting for SimHub**:確認使用資料線、選對 COM 埠、沒有其他程式占用序列埠,而且 SimHub 正在收到遊戲資料。+- Raw result 以 `DSH1;` 開頭且序號持續增加,但仍停在 Waiting:確認 Custom Protocol 已啟用於 SimHub 顯示為已連線的同一個 Arduino 裝置與 COM 埠。- 個別欄位顯示 `--`:該遊戲可能沒有提供對應屬性;其他支援欄位仍可正常使用。-- 油量一直不變:重新貼入最新版 [simhub/custom-protocol.txt](simhub/custom-protocol.txt)。公式會優先使用 SimHub 的即時 `FuelPercent`,有油箱容量時則直接計算。+- 油量一直不變:先檢查遊戲是否關閉油耗,再查看 SimHub 的 `Fuel`、`FuelPercent` 與油箱容量屬性。例如目前油量 30、公升容量 64 時,顯示 47% 是正確的;無限燃油會讓數值保持不變。- 韌體會過濾換檔時 750 ms 內短暫出現的空檔值;持續保持空檔或啟動時就在空檔,仍會正常顯示 `N`。## 注意事項- 七個主題共用同一份公式,切換主題後不需要重新設定 SimHub。-- 儀表會保存目前的連線選擇。使用 **Change Connection** 可切換 Direct GT7 與 SimHub USB。+- 儀表會保存目前的連線選擇。可直接在 Waiting 畫面切換,或在 **Device Settings** 選擇 **DIRECT GT7**/**SIMHUB USB**。- **Reset to Default** 會清除 Wi-Fi 與所有儀表設定,然後重新開始首次設定流程。- Repo 其他位置的歷史公式使用舊封包格式;本韌體只能使用 [simhub/custom-protocol.txt](simhub/custom-protocol.txt)。diff --git a/VERSION b/VERSIONindex f8e233b..227cea2 100644--- a/VERSION+++ b/VERSION@@ -1 +1 @@-1.9.0+2.0.0diff --git a/docs/TELEMETRY_PROTOCOL.md b/docs/TELEMETRY_PROTOCOL.mdindex 63b66c0..9e8a1b2 100644--- a/docs/TELEMETRY_PROTOCOL.md+++ b/docs/TELEMETRY_PROTOCOL.md@@ -40,10 +40,10 @@ DSH1;42;1;140;4;5600;68;90;01:24.631;01:25.104;01:24.382;4.5;5;3;10;80;68;36;0;1- First setup runs touch orientation before presenting explicit **Direct GT7** and **SimHub USB** choices. The connection choice is persisted.- Direct GT7 enables Wi-Fi and GT7 UDP only. With no saved network it opens the setup portal; Wi-Fi cannot be skipped in this mode.- SimHub USB keeps the Wi-Fi radio off and accepts only valid DSH1 frames over physical USB serial.-- Change Connection preserves other preferences. Reset to Default clears the connection, Wi-Fi credentials, touch orientation, theme and brightness, then returns to Touch Setup.+- Switching connection from the Waiting screen or Device Settings preserves other preferences. Reset to Default clears the connection, Wi-Fi credentials, touch orientation, theme and brightness, then returns to Touch Setup.- Handshake/USB presence alone never affects telemetry freshness. Continued idle frames maintain an existing lock; disconnect the idle sender to release it immediately.- Wi-Fi work runs on a separate FreeRTOS task because portal scans/saves can wait internally. Task-owned WiFiManager communicates with the main USB/render loop using bounded command/status queues. GT7 UDP is owned by the main loop.-- Device Settings exposes Change Connection and Reset to Default. Reset does not require an MCU restart.+- Device Settings exposes direct GT7/SimHub choices and Reset to Default. Reset does not require an MCU restart.## Validation@@ -68,8 +68,8 @@ The `Telemetry protocol tests` CI workflow runs both. Formula tests use mocked p- Upgrade without a saved connection choice: preserve existing preferences and show connection selection.- Confirm SimHub discovery at 19200, baud negotiation, Custom Protocol evaluation, all 25 property mappings, and continuous stationary/paused frames.- Run GT7 only, USB only, both, wrong Wi-Fi credentials, no formula, invalid formula, unplug/reconnect, and SimHub restart.-- While USB telemetry runs, scan/save/reset Wi-Fi; verify responsive rendering and no USB reconnect, protocol loss or mixed-source values.+- While USB telemetry runs, enter and cancel GT7 Wi-Fi Setup; verify responsive rendering and no USB reconnect, protocol loss or mixed-source values.- Exercise both display controllers and every theme with valid/missing fuel, temperatures, RPM, pedals and aids; verify sleep/wake, preview, source change and memory stability.-- Confirm settings are reachable while waiting, during play and after resetting Wi-Fi; verify portal cancellation and retries.+- Confirm settings are reachable while waiting and during play; verify portal cancellation, retries and Reset to Default.This protocol is intentionally incompatible with the historical unversioned `custProtocol.txt` and upstream tyre-pressure mapping. Install the new formula together with the new firmware.diff --git a/include/version.h b/include/version.hindex 948b55d..75f6009 100644--- a/include/version.h+++ b/include/version.h@@ -1,3 +1,3 @@#pragma once-inline constexpr char GT7_DASH_VERSION[] = "1.9.0";+inline constexpr char GT7_DASH_VERSION[] = "2.0.0";diff --git a/installer/firmware/firmware-ili9341.bin b/installer/firmware/firmware-ili9341.binindex 6fbc298..bd43598 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 39afb7a..eeb6bad 100644Binary files a/installer/firmware/firmware-st7789.bin and b/installer/firmware/firmware-st7789.bin differdiff --git a/installer/manifest-st7789.json b/installer/manifest-st7789.jsonindex 30a7fd3..5dae496 100644--- a/installer/manifest-st7789.json+++ b/installer/manifest-st7789.json@@ -1,6 +1,6 @@{"name": "ESP32 GT7 Dashboard (ST7789)",- "version": "1.9.0",+ "version": "2.0.0","new_install_prompt_erase": true,"builds": [{diff --git a/installer/manifest.json b/installer/manifest.jsonindex bde37e1..9c8b157 100644--- a/installer/manifest.json+++ b/installer/manifest.json@@ -1,6 +1,6 @@{"name": "ESP32 GT7 Dashboard (ILI9341)",- "version": "1.9.0",+ "version": "2.0.0","new_install_prompt_erase": true,"builds": [{diff --git a/installer/release-notes.json b/installer/release-notes.jsonindex c2c6363..7c2e469 100644--- a/installer/release-notes.json+++ b/installer/release-notes.json@@ -1,4 +1,10 @@{+ "2.0.0": [+ "Added explicit Direct GT7 Wi-Fi and SimHub USB connection modes with persistent on-device selection.",+ "Added a shared SimHub Custom Protocol for all seven dashboard themes, including missing-value handling and transient neutral filtering.",+ "Redesigned first-time touch, Wi-Fi, connection and reset flows with recoverable setup and direct connection switching from the Waiting screen.",+ "Updated Device Settings and bilingual SimHub documentation for the new dual-source workflow."+ ],"1.9.0": ["Added the Endurance dashboard theme, optimized for at-a-glance race telemetry with shift lights, a central gear display, lap timing, tyre temperatures, pedal inputs and fuel strategy."],diff --git a/installer/releases.json b/installer/releases.jsonindex fca59ca..b87400b 100644--- a/installer/releases.json+++ b/installer/releases.json@@ -1,5 +1,18 @@{"versions": [+ {+ "version": "2.0.0",+ "notes": [+ "Added explicit Direct GT7 Wi-Fi and SimHub USB connection modes with persistent on-device selection.",+ "Added a shared SimHub Custom Protocol for all seven dashboard themes, including missing-value handling and transient neutral filtering.",+ "Redesigned first-time touch, Wi-Fi, connection and reset flows with recoverable setup and direct connection switching from the Waiting screen.",+ "Updated Device Settings and bilingual SimHub documentation for the new dual-source workflow."+ ],+ "manifests": {+ "ili9341": "versions/2.0.0/manifest-ili9341.json",+ "st7789": "versions/2.0.0/manifest-st7789.json"+ }+ },{"version": "1.9.0","notes": [@@ -108,16 +121,6 @@"ili9341": "versions/1.2.6/manifest-ili9341.json","st7789": "versions/1.2.6/manifest-st7789.json"}- },- {- "version": "1.2.5",- "notes": [- "Added tyre-temperature colour display."- ],- "manifests": {- "ili9341": "versions/1.2.5/manifest-ili9341.json",- "st7789": "versions/1.2.5/manifest-st7789.json"- }}]}diff --git a/installer/versions/1.2.5/firmware-ili9341.bin b/installer/versions/1.2.5/firmware-ili9341.bindeleted file mode 100644index 81a3046..0000000Binary files a/installer/versions/1.2.5/firmware-ili9341.bin and /dev/null differdiff --git a/installer/versions/1.2.5/firmware-st7789.bin b/installer/versions/1.2.5/firmware-st7789.bindeleted file mode 100644index d85c2fa..0000000Binary files a/installer/versions/1.2.5/firmware-st7789.bin and /dev/null differdiff --git a/installer/versions/1.2.5/boot_app0.bin b/installer/versions/2.0.0/boot_app0.binsimilarity index 100%rename from installer/versions/1.2.5/boot_app0.binrename to installer/versions/2.0.0/boot_app0.bindiff --git a/installer/versions/1.2.5/bootloader.bin b/installer/versions/2.0.0/bootloader.binsimilarity index 100%rename from installer/versions/1.2.5/bootloader.binrename to installer/versions/2.0.0/bootloader.bindiff --git a/installer/versions/2.0.0/firmware-ili9341.bin b/installer/versions/2.0.0/firmware-ili9341.binnew file mode 100644index 0000000..bd43598Binary files /dev/null and b/installer/versions/2.0.0/firmware-ili9341.bin differdiff --git a/installer/versions/2.0.0/firmware-st7789.bin b/installer/versions/2.0.0/firmware-st7789.binnew file mode 100644index 0000000..eeb6badBinary files /dev/null and b/installer/versions/2.0.0/firmware-st7789.bin differdiff --git a/installer/versions/1.2.5/manifest-ili9341.json b/installer/versions/2.0.0/manifest-ili9341.jsonsimilarity index 95%rename from installer/versions/1.2.5/manifest-ili9341.jsonrename to installer/versions/2.0.0/manifest-ili9341.jsonindex 5c4fe8f..a59fbf1 100644--- a/installer/versions/1.2.5/manifest-ili9341.json+++ b/installer/versions/2.0.0/manifest-ili9341.json@@ -1,6 +1,6 @@{"name": "ESP32 GT7 Dashboard (ILI9341)",- "version": "1.2.5",+ "version": "2.0.0","new_install_prompt_erase": true,"builds": [{diff --git a/installer/versions/1.2.5/manifest-st7789.json b/installer/versions/2.0.0/manifest-st7789.jsonsimilarity index 95%rename from installer/versions/1.2.5/manifest-st7789.jsonrename to installer/versions/2.0.0/manifest-st7789.jsonindex 207287d..ad04fc8 100644--- a/installer/versions/1.2.5/manifest-st7789.json+++ b/installer/versions/2.0.0/manifest-st7789.json@@ -1,6 +1,6 @@{"name": "ESP32 GT7 Dashboard (ST7789)",- "version": "1.2.5",+ "version": "2.0.0","new_install_prompt_erase": true,"builds": [{diff --git a/installer/versions/1.2.5/partitions.bin b/installer/versions/2.0.0/partitions.binsimilarity index 100%rename from installer/versions/1.2.5/partitions.binrename to installer/versions/2.0.0/partitions.bindiff --git a/src/SHCustomProtocol.h b/src/SHCustomProtocol.hindex 0421872..7a8011c 100644--- a/src/SHCustomProtocol.h+++ b/src/SHCustomProtocol.h@@ -1047,7 +1047,8 @@ public:gt7SelectionPending = false;wifiStopRequested = true;networkChanged = true;- showSettingsScreen(wifiReturnScreen);+ if (wifiReturnScreen == SettingsScreen::Closed) closeSettings();+ else showSettingsScreen(wifiReturnScreen);}void noteUsbCommand() { if (!usbSeen) connectingScreenActive = false; usbSeen = true; lastUsbCommandTime = millis(); }bool customReadPending() const { return receivingCustom; }@@ -1406,11 +1407,7 @@ public:barHeight,tft.color565(28, 28, 28));- tft.drawCentreString(- "Tap for settings",- SCREEN_WIDTH / 2,- SCREEN_HEIGHT - 26,- 1);+ drawWaitingConnectionSwitch(false);tft.drawCentreString(String("v") + GT7_DASH_VERSION + " | by caa1211",@@ -1419,6 +1416,40 @@ public:1);}+ void drawWaitingConnectionSwitch(bool pressed)+ {+ const int x = 80, y = 24, width = 160, height = 25;+ const uint16_t fill = pressed+ ? tft.color565(18, 74, 104)+ : tft.color565(13, 15, 18);+ const uint16_t border = pressed+ ? tft.color565(80, 180, 220)+ : tft.color565(58, 62, 68);+ tft.fillRoundRect(x, y, width, height, 7, fill);+ tft.drawRoundRect(x, y, width, height, 7, border);+ tft.setTextDatum(MC_DATUM);+ tft.setTextColor(pressed ? TFT_WHITE : tft.color565(125, 130, 136), fill);+ tft.drawString(+ telemetry.mode == TelemetryMode::SimHub+ ? "SWITCH TO DIRECT GT7"+ : "SWITCH TO SIMHUB USB",+ x + width / 2, y + height / 2, 1);+ }++ bool waitingConnectionSwitchAtTouch() const+ {+ // Keep the control visually quiet while providing a finger-sized target.+ return touchInside(50, 12, 220, 48);+ }++ void switchConnectionFromWaiting()+ {+ if (telemetry.mode == TelemetryMode::SimHub)+ requestConnection(TelemetryMode::GT7, SettingsScreen::Closed);+ else+ selectConnection(TelemetryMode::SimHub);+ }+void drawConnectingBar(){const int barWidth = 110;@@ -2225,6 +2256,7 @@ public:static bool wasTouched = false;static bool waitForReleaseAfterScreenChange = false;+ static bool waitingConnectionPressed = false;static uint16_t initialTouchRawX = 0, initialTouchRawY = 0;uint16_t rawTouchX = 0;uint16_t rawTouchY = 0;@@ -2296,6 +2328,10 @@ public:{gameStoppedTimerStarted = true;gameStoppedTime = millis();+ if (settingsScreen == SettingsScreen::Closed) {+ waitingConnectionPressed = waitingConnectionSwitchAtTouch();+ if (waitingConnectionPressed) drawWaitingConnectionSwitch(true);+ }}if (settingsScreen != SettingsScreen::Closed)@@ -2332,8 +2368,15 @@ public:if (!isTouched && wasTouched){- showSettingsScreen(SettingsScreen::Main);- waitForReleaseAfterScreenChange = true;+ if (waitingConnectionPressed) {+ const bool activate = waitingConnectionSwitchAtTouch();+ waitingConnectionPressed = false;+ if (activate) switchConnectionFromWaiting();+ else drawWaitingConnectionSwitch(false);+ } else {+ showSettingsScreen(SettingsScreen::Main);+ waitForReleaseAfterScreenChange = true;+ }}wasTouched = isTouched;