update
This commit is contained in:
parent
a4b322b865
commit
d0fb89d7db
1 changed files with 12 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue