Arquivos
ardrone-autonomy/tests/simple.js
T
Laurent Eschenauer 657c5dd4a8 Improving controller
- Controller emit events
- Log directly to csv file in example repl
- Consider state stable after some delay
- Playing wit PID coefficients (not ideal yet)
2013-06-19 22:46:21 +02:00

19 linhas
541 B
JavaScript

// TODO This is broken. Need to write real tests.
console.log("The test is broken. Will have to write proper tests :-)");
var autonomy = require('..');
var client = require('./mock/client');
var controller = new autonomy.Controller(new client(), {state: {x: 0, y:0, z:1, yaw: 0}});
console.log("State: %j", controller.state());
controller.on('controlData', function(data) {
console.log("%j", data);
});
controller.go({x: 1, y: 1}, function(state) {
console.log("Reached state %j", state);
controller.disable();
});