Ejemplo n.º 1
0
        public CommunicationController(NanoDrone drone)
        {
            this.drone = drone;
            webserver  = new Webserver.Webserver(666);

            new MotorRoutes(webserver, this.drone);
            new OrientationRoutes(webserver, this.drone);
            new FlightRoutes(webserver, this.drone);
        }
Ejemplo n.º 2
0
 protected override void OnLaunched(LaunchActivatedEventArgs e)
 {
     try
     {
         drone = new Controllers.NanoDrone();
     } catch (Exception exception)
     {
         LogException(exception);
     }
 }
Ejemplo n.º 3
0
        public OrientationController(NanoDrone drone)
        {
            this.drone   = drone;
            this.running = false;

            sensor = new OrientationSensor();

            this.SetOwnOrientation(0, 0, 0);
            this.SetTargetOrientation(0, 0, 0);
            Start();
        }
Ejemplo n.º 4
0
        public MotorController(NanoDrone drone)
        {
            this.drone      = drone;
            this.throttle   = 0;
            this.pitchPower = 0;
            this.yawPower   = 0;
            this.rollPower  = 0;

            InitSensors();
            InitMotors();
            Throttle(0);
        }