diff --git a/src/lib/Controller.svelte b/src/lib/Controller.svelte index 6f00b87..8341197 100644 --- a/src/lib/Controller.svelte +++ b/src/lib/Controller.svelte @@ -123,9 +123,20 @@ } if (newGpDictState.buttons.x.pressed) { // one time action - console.log("Stop robot action"); + console.log("stop robot action"); currentWs.send("stop_robot", {}); } + if (hasGpChange(['buttons.triangle'])) { + if(newGpDictState.buttons.triangle.pressed){ + // one time action + console.log("turbine action"); + currentWs.send("set_turbine", {"speed":20}); + } + else{ + console.log("stop_turbine") + currentWs.send("set_turbine",{"speed":0}) + } + } if (hasGpChange(['axes.left_joystick_x', 'axes.left_joystick_y'])) { leftJoystick.onGamepadJoystickChange(