cylon/examples/drone_nav/drone_nav.js

15 lines
380 B
JavaScript

var Cylon = require('../..');
Cylon.robot({
connection: { name: 'ardrone', adaptor: 'ardrone', port: '192.168.1.1' },
devices: [
{ name: 'drone', driver: 'ardrone' },
{ name: 'nav', driver: 'ardroneNav' }
],
work: function(my) {
my.drone.config('general:navdata_demo', 'TRUE');
my.nav.on('update', function(data) { console.log(data); });
}
}).start();