modify eva
This commit is contained in:
Родитель
52e9e6fbcb
Коммит
085e4bbedb
|
@ -1,11 +1,12 @@
|
||||||
//var baseurl = "http://10.0.0.3:8080";
|
var baseurl = "http://10.0.0.3:8080";
|
||||||
//var url = "10.0.0.3";
|
var url = "10.0.0.3";
|
||||||
|
|
||||||
//var baseurl = "http://10.251.38.229:8080";
|
//var baseurl = "http://10.251.38.229:8080";
|
||||||
//var url = "10.251.38.229";
|
//var url = "10.251.38.229";
|
||||||
//var baseurl = "http://10.251.43.162:8080";
|
//var baseurl = "http://10.251.43.162:8080";
|
||||||
//var url = "10.251.43.162";
|
//var url = "10.251.43.162";
|
||||||
var baseurl = "http://192.168.1.2:8080";
|
//var baseurl = "http://192.168.1.2:8080";
|
||||||
var url = "192.168.1.2";
|
//var url = "192.168.1.2";
|
||||||
|
|
||||||
|
|
||||||
$.ajax({"url":baseurl + "/ls"}).done(function (data) {
|
$.ajax({"url":baseurl + "/ls"}).done(function (data) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ function app(){
|
||||||
id:"start",
|
id:"start",
|
||||||
text: 'takeoff',
|
text: 'takeoff',
|
||||||
click: function () {
|
click: function () {
|
||||||
ROT.writeTag("drone", "start", function(data){
|
ROT.writeTag("eva", "start", function(data){
|
||||||
console.log("wrote data to drone");
|
console.log("wrote data to drone");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ function app(){
|
||||||
id:"stop",
|
id:"stop",
|
||||||
text: 'land',
|
text: 'land',
|
||||||
click: function () {
|
click: function () {
|
||||||
ROT.writeTag("drone", "stop", function(data){
|
ROT.writeTag("eva", "stop", function(data){
|
||||||
console.log("wrote data to drone ");
|
console.log("wrote data to drone ");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,8 @@ var ROT = {};
|
||||||
//var baseurl = "http://10.0.0.3:8080";
|
//var baseurl = "http://10.0.0.3:8080";
|
||||||
//var baseurl = "http://10.251.38.229:8080";
|
//var baseurl = "http://10.251.38.229:8080";
|
||||||
//var baseurl = "http://10.251.43.162:8080";
|
//var baseurl = "http://10.251.43.162:8080";
|
||||||
var baseurl = "http://192.168.1.2:8080";
|
//var baseurl = "http://192.168.1.2:8080";
|
||||||
|
var baseurl = "http://10.0.0.3:8080";
|
||||||
var allUuids = [];
|
var allUuids = [];
|
||||||
var allThings = {};
|
var allThings = {};
|
||||||
var allFeatures = {}
|
var allFeatures = {}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"directoryServer": "http://192.168.1.2:8080",
|
"directoryServer": "http://10.0.0.3:8080",
|
||||||
"tagFile":"/tmp/tags.json",
|
"tagFile":"/tmp/tags.json",
|
||||||
"port":3000,
|
"port":3000,
|
||||||
"proxyport":3000,
|
"proxyport":3000,
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
"photocell":{"url":"http://localhost:4444"},
|
"photocell":{"url":"http://localhost:4444"},
|
||||||
"webiopi":{"url":"http://localhost:4545"},
|
"webiopi":{"url":"http://localhost:4545"},
|
||||||
"some_drone":{"url":"http://192.168.1.2:7777"},
|
"some_drone":{"url":"http://192.168.1.2:7777"},
|
||||||
"some_robot":{"url":"http://192.168.1.3:7777"}
|
"some_robot":{"url":"http://10.0.0.10:7777"}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,9 @@ function step() {
|
||||||
}
|
}
|
||||||
, 200);
|
, 200);
|
||||||
}
|
}
|
||||||
var run = 0;
|
|
||||||
run = setInterval(step, 2500);
|
var run = setInterval(step, 2500);
|
||||||
var port = 7777;
|
var port = 7777;
|
||||||
console.log("listening on port: ", port);
|
console.log("listening on port: ", port);
|
||||||
var app = express();
|
var app = express();
|
||||||
|
|
||||||
|
@ -82,9 +82,11 @@ app.put("/", function(req, res){
|
||||||
console.log("Hello human. I am EVA");
|
console.log("Hello human. I am EVA");
|
||||||
}
|
}
|
||||||
if (req.text === "start") {
|
if (req.text === "start") {
|
||||||
|
count = 0;
|
||||||
run = setInterval(step, 2500);
|
run = setInterval(step, 2500);
|
||||||
}
|
}
|
||||||
if (req.text === "stop") {
|
if (req.text === "stop") {
|
||||||
|
count = 0;
|
||||||
clearInterval(run);
|
clearInterval(run);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Загрузка…
Ссылка в новой задаче