This commit is contained in:
[Valentino Heman Budiarto] 2026-08-11 20:21:34 +07:00
parent 3a1d30587e
commit f7d2cb40c9

View File

@ -70,9 +70,9 @@ export default function RobotDashboard() {
if (activeGp) { if (activeGp) {
const rawX = activeGp.axes[0]; const rawX = activeGp.axes[0];
// PERUBAHAN LOGIKA GAS SESUAI PERMINTAANMU // PERUBAHAN: Index 6 dan 7 sudah ditukar posisinya!
const maju = activeGp.buttons[7].value; // Tombol 7 (RT) untuk maju const maju = activeGp.buttons[6].value; // RT untuk maju (Index 6)
const mundur = activeGp.buttons[6].value; // Tombol 6 (LT) untuk mundur const mundur = activeGp.buttons[7].value; // LT untuk mundur (Index 7)
const throttle = maju - mundur; const throttle = maju - mundur;
currentX = Math.abs(rawX) > 0.15 ? Number(rawX.toFixed(2)) : 0; currentX = Math.abs(rawX) > 0.15 ? Number(rawX.toFixed(2)) : 0;