Skip to content

Commit

Permalink
fancytakeoff
Browse files Browse the repository at this point in the history
  • Loading branch information
mtwstudios committed Sep 29, 2013
1 parent 50810c6 commit 4ed2cc2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions drone.js
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions index.html
Expand Up @@ -67,6 +67,7 @@ <h2 id="text"></h2>
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');
</script>

0 comments on commit 4ed2cc2

Please sign in to comment.