Exemplo n.º 1
0
        public GraphForm(Drone drone, FlightControl flightControl)
        {
            InitializeComponent();

            this.Drone = drone;
            this.Drone.OnSettingsChange += Drone_OnSettingsChange;
            this.Drone.OnDataChange     += Drone_OnDataChange;

            this.FlightControl = flightControl;

            UpdateSettings(Drone.Settings);

            orientationGraphList.ValueMinimums = new double[] { -180, -180, 0 };
            orientationGraphList.ValueMaximums = new double[] { 180, 180, 360 };

            const double rotationRange = 500;

            rotationGraphList.ValueMinimums = new double[] { -rotationRange, -rotationRange, -rotationRange };
            rotationGraphList.ValueMaximums = new double[] { rotationRange, rotationRange, rotationRange };

            const double accelerationRange = 3;

            accelerationGraphList.ValueMinimums = new double[] { -accelerationRange, -accelerationRange, -accelerationRange };
            accelerationGraphList.ValueMaximums = new double[] { accelerationRange, accelerationRange, accelerationRange };
        }
Exemplo n.º 2
0
        public GraphForm(Drone drone, FlightControl flightControl)
        {
            InitializeComponent();

            this.Drone = drone;
            this.Drone.OnSettingsChange += Drone_OnSettingsChange;
            this.Drone.OnDataChange += Drone_OnDataChange;

            this.FlightControl = flightControl;

            UpdateSettings(Drone.Settings);

            orientationGraphList.ValueMinimums = new double[] { -90, -90, 0 };
            orientationGraphList.ValueMaximums = new double[] { 90, 90, 360 };

            const double rotationRange = 25;
            rotationGraphList.ValueMinimums = new double[] { -rotationRange, -rotationRange, -rotationRange };
            rotationGraphList.ValueMaximums = new double[] { rotationRange, rotationRange, rotationRange };

            const double accelerationRange = 2;
            accelerationGraphList.ValueMinimums = new double[] { -accelerationRange, -accelerationRange, -accelerationRange };
            accelerationGraphList.ValueMaximums = new double[] { accelerationRange, accelerationRange, accelerationRange };
        }