Comparing version 0.0.5 to 0.0.6
@@ -48,2 +48,4 @@ var EventEmitter = require('events').EventEmitter; | ||
Client.prototype.resume = function() { | ||
// request basic navdata by default | ||
this.config('general:navdata_demo', 'TRUE'); | ||
this.disableEmergency(); | ||
@@ -140,3 +142,4 @@ this._setInterval(30); | ||
Client.prototype.takeoff = function() { | ||
Client.prototype.takeoff = function(cb) { | ||
this.once('hovering', cb || function() {}); | ||
this._ref.fly = true; | ||
@@ -146,3 +149,4 @@ return true; | ||
Client.prototype.land = function() { | ||
Client.prototype.land = function(cb) { | ||
this.once('landed', cb || function() {}); | ||
this._ref.fly = false; | ||
@@ -149,0 +153,0 @@ return true; |
@@ -5,3 +5,3 @@ { | ||
"description": "A node.js client for controlling Parrot AR Drone 2.0 quad-copters.", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"homepage": "https://github.com/felixge/node-ar-drone", | ||
@@ -8,0 +8,0 @@ "repository": { |
@@ -133,9 +133,11 @@ # ar-drone | ||
#### client.takeoff() | ||
#### client.takeoff(cb) | ||
Sets the internal `fly` state to `true`. | ||
Sets the internal `fly` state to `true`, `cb` is invoked after the drone | ||
reports that it is hovering. | ||
#### client.land() | ||
#### client.land(cb) | ||
Sets the internal `fly` state to `false`. | ||
Sets the internal `fly` state to `false`, `cb` is invoked after the drone | ||
reports it has landed. | ||
@@ -192,3 +194,3 @@ #### client.up(speed) / client.down(speed) | ||
```js | ||
client.animate('flipLeft', 15); | ||
client.animate('flipLeft', 1500); | ||
``` | ||
@@ -387,4 +389,17 @@ | ||
* DEFAULT_DRONE_IP | ||
* DEFAULT_DRONE_IP | ||
## Camera access | ||
You can access the head camera and the bottom camera, you just have the change | ||
the config: | ||
```javascript | ||
// access the head camera | ||
client.config('video:video_channel', 0); | ||
// access the bottom camera | ||
client.config('video:video_channel', 3); | ||
``` | ||
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
287947
54
3740
403
11