Compare commits
No commits in common. "5d07a7304863caced662818475b354d240f3772f" and "a4b322b865415547ff0941fc2dcfa12fd39af2c9" have entirely different histories.
5d07a73048
...
a4b322b865
1 changed files with 1 additions and 39 deletions
|
@ -16,7 +16,6 @@
|
|||
|
||||
const ZONE_DIRECTIONS_MAPPING = ["E", "NE", "N", "NW", "W", "SW", "S", "SE"];
|
||||
|
||||
let telescopeDeployed = false;
|
||||
let joystickBankEnabled = false;
|
||||
let navigationEnabled = true;
|
||||
|
||||
|
@ -124,38 +123,10 @@
|
|||
}
|
||||
if (newGpDictState.buttons.x.pressed) {
|
||||
// one time action
|
||||
console.log("stop robot action");
|
||||
console.log("Stop robot action");
|
||||
currentWs.send("stop_robot", {});
|
||||
}
|
||||
|
||||
if (hasGpChange(['axes.cross_x', 'axes.cross_y'])) {
|
||||
console.log(newGpDictState.axes.cross_x, newGpDictState.axes.cross_y);
|
||||
if (newGpDictState.axes.cross_y == -1) {
|
||||
console.log("souffler");
|
||||
currentWs.send("turbine_souffler")
|
||||
}
|
||||
if (newGpDictState.axes.cross_y == 1) {
|
||||
console.log("aspirer");
|
||||
currentWs.send("turbine_aspirer")
|
||||
|
||||
}
|
||||
if (newGpDictState.axes.cross_x != 0) {
|
||||
currentWs.send("turbine_stop")
|
||||
}
|
||||
|
||||
}
|
||||
if (hasGpChange(['buttons.triangle'])) {
|
||||
if (newGpDictState.buttons.triangle.pressed) {
|
||||
telescopeDeployed = !telescopeDeployed;
|
||||
}
|
||||
if (telescopeDeployed) {
|
||||
currentWs.send("telescope_deploy")
|
||||
}
|
||||
if (!telescopeDeployed) {
|
||||
currentWs.send("telescope_zero")
|
||||
}
|
||||
}
|
||||
|
||||
if (hasGpChange(['axes.left_joystick_x', 'axes.left_joystick_y'])) {
|
||||
leftJoystick.onGamepadJoystickChange(
|
||||
newGpDictState.axes.left_joystick_x,
|
||||
|
@ -231,15 +202,6 @@
|
|||
}
|
||||
|
||||
onMount(() => {
|
||||
window.setTurbine = (speed) => {
|
||||
currentWs.send("set_turbine", {"speed":speed});
|
||||
}
|
||||
window.setRange = (name, min, max) => {
|
||||
currentWs.send("set_range", {name, min, max})
|
||||
}
|
||||
console.log(window.setTurbine);
|
||||
|
||||
|
||||
translationZones = generateTranslationZones();
|
||||
rotationZones = [
|
||||
{ from: Math.PI/2+ -(6/8)*Math.PI, to: Math.PI/2+ -(2/8)*Math.PI },
|
||||
|
|
Loading…
Reference in a new issue