diff --git a/drone.js b/drone.js index f9343a8..8d3764c 100644 --- a/drone.js +++ b/drone.js @@ -102,6 +102,21 @@ io.sockets.on('connection', function (socket) { }); }); + socket.on('fancytakeoff', function (data) { + console.log('FANCY TAKEOFF!'); + clients.forEach(function(client) { + client.takeoff(); + + setTimeout(function() { + console.log("1. up"); + clients.forEach(function(client) { + client.up(0.6); + stopAfter(1500); + }); + }, 5000); + }); + }); + socket.on('land', function (data) { console.log('LANDING!'); clients.forEach(function(client) { diff --git a/index.html b/index.html index 44cb82f..9012851 100644 --- a/index.html +++ b/index.html @@ -67,6 +67,7 @@

if(io) { var socket = io.connect('http://localhost'); } + //var socket = io.connect('http://192.168.33.110'); //socket.emit('my other event', { my: 'data' }); //socket.emit('takeoff');