Send XY data every 30 ms

parent 0261f1fe
......@@ -3,7 +3,7 @@ defmodule Grains.Mixfile do
def project do
[app: :grains,
version: "0.0.91",
version: "0.0.93",
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix, :gettext] ++ Mix.compilers,
......
......@@ -42,7 +42,7 @@ let XyPanel = {
}
});
that.timer = setInterval( function() { that.send_value(that.xy.values); }, 10);
that.timer = setInterval( function() { that.send_value(that.xy.values); }, 30);
a.background = 'black';
a.add(that.xy);
......@@ -59,8 +59,6 @@ let XyPanel = {
send_value(values) {
let d = new Date();
if (d.getTime() % 5 == 0) {
let x = Math.round(200 * (values[0].x - 0.5) * 3.14) / 100;
let y = Math.round(200 * (values[0].y - 0.5) * 3.14) / 100;
......@@ -72,7 +70,6 @@ let XyPanel = {
// console.log(payload);
this.xyChannel.push("xy", payload)
.receive("error", e => console.log(e));
}
......
Markdown is supported
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