From b3ec4a37e2a659f2e83fe199a2a34fec1e6219cc Mon Sep 17 00:00:00 2001 From: AskaEth Date: Mon, 27 Jul 2026 08:27:19 +0800 Subject: [PATCH] fix: G-force longitudinal sign direction --- dashboards/g_force/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboards/g_force/index.html b/dashboards/g_force/index.html index 5bd5af9..f236cac 100644 --- a/dashboards/g_force/index.html +++ b/dashboards/g_force/index.html @@ -54,7 +54,7 @@ const M={aspect_ratio:"1:1",render_mode:"contain"}; ctx.beginPath();ctx.arc(cx,cy,r/limit,0,Math.PI*2);ctx.setLineDash([4,8]);ctx.strokeStyle='rgba(255,255,255,.08)';ctx.lineWidth=1;ctx.stroke();ctx.setLineDash([]); // G dot - const x=Math.max(-limit,Math.min(limit,ax/G)),y=Math.max(-limit,Math.min(limit,-az/G)); + const x=Math.max(-limit,Math.min(limit,ax/G)),y=Math.max(-limit,Math.min(limit,az/G)); const dx=cx+(x/limit)*r,dy=cy+(y/limit)*r; ctx.beginPath();ctx.arc(dx,dy,Math.max(6,r/25),0,Math.PI*2); const i=Math.sqrt(x*x+y*y)/limit; @@ -74,7 +74,7 @@ const M={aspect_ratio:"1:1",render_mode:"contain"}; // numbers ctx.fillStyle='rgba(255,255,255,.25)';ctx.font=`${Math.max(14,W/40)|0}px sans-serif`;ctx.textAlign='center'; ctx.fillText('Lat ' + (ax/G).toFixed(2) + 'G', cx, cy-r-20); - ctx.fillText('Long ' + (-az/G).toFixed(2) + 'G', cx, cy+r+30); + ctx.fillText('Long ' + (az/G).toFixed(2) + 'G', cx, cy+r+30); ctx.fillText('L', cx-r-14, cy+4);ctx.fillText('R', cx+r+14, cy+4); ctx.fillText('Brake', cx, cy-r-10);ctx.fillText('Accel', cx, cy+r+24); }