felixge / felixge/node-ar-drone

Cant receive GPS data

Open
#111 15 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.8k
Forks
427
PR merge metrics
No merged PRs in 30d

Description

Hi I have tried the following code however it just returns undefined for couple of time and then doesn't output anything
whats the problem here ?

var arDrone = require('ar-drone');
var arDroneConstants = require('ar-drone/lib/constants');

var fs = require('fs');

function navdataOptionMask(c) {
return 1 << c;
}

var navdataOptions = (
navdataOptionMask(arDroneConstants.options.DEMO)
| navdataOptionMask(arDroneConstants.options.VISION_DETECT)
| navdataOptionMask(arDroneConstants.options.MAGNETO)
| navdataOptionMask(arDroneConstants.options.WIFI)
| navdataOptionMask(arDroneConstants.options.ZIMMU_3000)
);

// Connect and configure the drone
var client = new arDrone.createClient();
client.config('general:navdata_demo', true);
client.config('general:navdata_options', navdataOptions);

client.on('navdata', function(navdata){
console.log(navdata.gps);
});

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.