From 41da7c03d563c3d600c0bd517540405a5f193941 Mon Sep 17 00:00:00 2001 From: AskaEth Date: Sun, 26 Jul 2026 13:37:29 +0800 Subject: [PATCH] fix: default gear N, defer initial draw until canvas sized --- dashboards/forza_composite/index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dashboards/forza_composite/index.html b/dashboards/forza_composite/index.html index ec00b45..059a5d7 100644 --- a/dashboards/forza_composite/index.html +++ b/dashboards/forza_composite/index.html @@ -41,7 +41,7 @@ html,body{width:100%;height:100%;overflow:hidden;background:#060a16;color:#fff;
0
KM/H
-
1
+
N
THR
BRK
@@ -171,7 +171,8 @@ function up(d){const rpm=d.rpm||0,mr=d.max_rpm||8000,g=d.gear||0,sp=d.speed_kmh| const fp=Math.round((d.fuel||1)*100);fF.style.width=fp+'%';fV.textContent=fp+'%'; const et=d.engine_temp||0;if(et>0){const ep=Math.min(et/120,1)*100;wF.style.width=ep+'%';wV.textContent=Math.round(et)+'\u00B0C'}} -draw(0,8000);apply();window.addEventListener('resize',()=>{apply();draw(lR>0?lR:0,8000)});cn() +apply();window.addEventListener('resize',()=>{apply();draw(lR>0?lR:0,8000)});cn(); +setTimeout(()=>{apply();draw(0,8000)},100); })();