Merge branch 'master' of github.com:eschnou/ardrone-webflight

Esse commit está contido em:
Bernhard K. Weisshuhn
2013-09-13 15:42:24 +02:00
4 arquivos alterados com 15 adições e 3 exclusões
+2
Ver Arquivo
@@ -78,6 +78,8 @@ Use the `tab` key to toggle acceleration speed slow/fast.
Use the `f` key to perform a flip in the current direction of movement.
Use the `c` key to switch the video feed between front/bottom camera.
### Record a mission
Just press the `r` to start recording. A popup alers you when the recording starts. Press `r` again to stop. Each mission
+1 -1
Ver Arquivo
@@ -1,6 +1,6 @@
{
"name": "ardrone-webflight",
"version": "0.1.0",
"version": "0.1.1",
"description": "Extensible remote-control environment for the AR Drone.",
"main": "app.js",
"repository": {
+7
Ver Arquivo
@@ -1,3 +1,5 @@
var channel = 0;
function pilot(name, deps) {
deps.io.sockets.on('connection', function (socket) {
socket.on('/pilot/move', function (cmd) {
@@ -22,6 +24,11 @@ function pilot(name, deps) {
console.log("animate", cmd);
return deps.client.animate(cmd.action, 500);
});
socket.on('/pilot/channel', function (cmd) {
channel = (channel == 0) ? 1 : 0;
console.log("switching to channel %d", channel);
return deps.client.config('video:video_channel', channel);
});
});
};
+5 -2
Ver Arquivo
@@ -10,7 +10,8 @@ PILOT_ACCELERATION = 0.04;
, backward = 's'
, left = 'a'
, right = 'd'
, flip = 'f'
, flip = 'f'
, channel = 'c'
;
if (options && options.keyboard === 'qwerty') { }
else if (options && options.keyboard === 'azerty') {
@@ -75,7 +76,9 @@ PILOT_ACCELERATION = 0.04;
ev : 'move',
action : 'right'
};
Keymap[keyCodeMap[channel]] = {
ev : 'channel'
};
/*
* Constructuor