2014-12-14 08:19:25 +08:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
var Cylon = require("../..");
|
2013-11-29 04:34:15 +08:00
|
|
|
|
|
|
|
Cylon.robot({
|
2014-11-26 08:01:31 +08:00
|
|
|
connections: {
|
2014-12-14 08:19:25 +08:00
|
|
|
crazyflie: { adaptor: "crazyflie", port: "radio://1/10/250KPS" }
|
2014-11-26 08:01:31 +08:00
|
|
|
},
|
|
|
|
|
|
|
|
devices: {
|
2014-12-14 08:19:25 +08:00
|
|
|
drone: { driver: "crazyflie" }
|
|
|
|
},
|
2013-11-29 04:34:15 +08:00
|
|
|
|
|
|
|
work: function(my) {
|
2014-12-14 08:19:25 +08:00
|
|
|
my.drone.on("start", function() {
|
2013-11-29 04:34:15 +08:00
|
|
|
my.drone.takeoff();
|
2014-11-26 06:39:24 +08:00
|
|
|
after((10).seconds(), my.drone.land);
|
|
|
|
after((15).seconds(), my.drone.stop);
|
2013-11-29 04:34:15 +08:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}).start();
|