Commit fe04cf8a authored by Jens-Christian Fischer's avatar Jens-Christian Fischer
Browse files

start()!

parent c624c443
......@@ -3,7 +3,7 @@ defmodule Grains.Mixfile do
def project do
[app: :grains,
version: "0.0.20",
version: "0.0.21",
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
......
......@@ -16,37 +16,10 @@ import "phoenix_html";
import socket from "./socket"
import SliderPanel from "./slider";
import OrientationPanel from "./orientation";
import Interface from "interface.js";
SliderPanel.init(socket, "#sliderPanel", ["s1", "s2", "s3"]);
// OrientationPanel.init(socket, "orientationPanel");
var a = new Interface.Panel({
container:document.getElementById("orientationPanel")
});
var orientation = new Interface.Orientation({
onvaluechange : function(_pitch, _roll, _yaw, _heading) {
pitch.setValue(_pitch);
roll.setValue(_roll);
yaw.setValue(_yaw);
}
}).start();
var pitch = new Interface.Slider({
label: 'pitch',
bounds:[.05,.05,.2,.9]
});
var roll = new Interface.Slider({
label: 'roll',
bounds:[.25,.05,.2,.9]
});
var yaw = new Interface.Slider({
label: 'yaw',
bounds:[.45,.05,.2,.9]
});
a.background = 'black';
a.add(pitch, roll, yaw);
OrientationPanel.init(socket, "orientationPanel");
// Import local files
//
......
......@@ -14,36 +14,6 @@ let OrientationPanel = {
}
var a = new Interface.Panel({
container:document.getElementById(domId)
});
var orientation = new Interface.Orientation({
onvaluechange : function(_pitch, _roll, _yaw, _heading) {
pitch.setValue(_pitch);
roll.setValue(_roll);
yaw.setValue(_yaw);
}
});
var pitch = new Interface.Slider({
label: 'pitch',
bounds:[.05,.05,.2,.9]
});
var roll = new Interface.Slider({
label: 'roll',
bounds:[.25,.05,.2,.9]
});
var yaw = new Interface.Slider({
label: 'yaw',
bounds:[.45,.05,.2,.9]
});
a.background = 'black';
a.add(pitch, roll, yaw);
return;
let that = this;
socket.connect();
this.orientationChannel = socket.channel("orientation:" + domId);
......@@ -61,7 +31,7 @@ a.add(pitch, roll, yaw);
.receive("error", reason => console.log("join failed", reason));
let b = new Interface.Panel({
let a = new Interface.Panel({
container:document.getElementById(domId)
});
console.log("adding orientation");
......@@ -73,7 +43,7 @@ a.add(pitch, roll, yaw);
that.send_value(pitch, roll, yaw, heading);
}
});
}).start();
let nrSliders = this.slider_titles.length;
......@@ -88,8 +58,6 @@ a.add(pitch, roll, yaw);
a.add(this.sliders[s]);
});
a.background = 'black';
console.log("initialized orientation");
},
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment