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);
        }
Exemple #2
0
 protected override void OnLaunched(LaunchActivatedEventArgs e)
 {
     try
     {
         drone = new Controllers.NanoDrone();
     } catch (Exception exception)
     {
         LogException(exception);
     }
 }
Exemple #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();
        }
Exemple #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);
        }