コード例 #1
0
        public void Arm()
        {
            _flightRecorder.Publish("Arm");
            var msg = UasCommands.ComponentArmDisarm(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, 1);

            SendMessage(msg);
        }
コード例 #2
0
        public void Takeoff()
        {
            _flightRecorder.Publish("Take off");
            var msg = UasCommands.NavTakeoff(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, 0, 0, float.NaN, 0, TakeoffAltitude);

            _connectedUasManager.Active.Transport.SendMessage(msg);
        }
コード例 #3
0
        public void StartMission()
        {
            _flightRecorder.Publish("Start Mission");
            var msg = UasCommands.MissionStart(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, 0, 5);

            _connectedUasManager.Active.Transport.SendMessage(msg);
        }
コード例 #4
0
        public void ReturnToHome()
        {
            _flightRecorder.Publish("Return Home");
            var msg = UasCommands.NavReturnToLaunch(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId);

            SendMessage(msg);
        }
コード例 #5
0
        public void Land()
        {
            _flightRecorder.Publish("Land");
            var msg = UasCommands.NavLandLocal(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, 0, 0, 0, 0, 0, 0, 0);

            SendMessage(msg);
        }
コード例 #6
0
 public void Done()
 {
     _connectedUasManager.Active.Transport.SendMessage(UasCommands.PreflightCalibration(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, 0, 0, 0, 0, 2, 0, 0));
     BeginCommand.RaiseCanExecuteChanged();
     CancelCommand.RaiseCanExecuteChanged();
     DoneCommand.RaiseCanExecuteChanged();
     NextCommand.RaiseCanExecuteChanged();
 }
コード例 #7
0
        public void Next()
        {
            if (IsActive)
            {
                var ack = new UasCommandAck()
                {
                    TargetComponent = _connectedUasManager.Active.Uas.ComponentId,
                    TargetSystem    = _connectedUasManager.Active.Uas.SystemId,
                    Command         = 1,
                    Result          = 1,
                };

                _connectedUasManager.Active.Transport.SendMessage(ack);
            }

            _connectedUasManager.Active.Transport.SendMessage(UasCommands.PreflightCalibration(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, 0, 0, 0, 0, 1, 0, 0));
            BeginCommand.RaiseCanExecuteChanged();
            CancelCommand.RaiseCanExecuteChanged();
            DoneCommand.RaiseCanExecuteChanged();
            NextCommand.RaiseCanExecuteChanged();
        }
コード例 #8
0
        public void GetHomePosition()
        {
            var msg = UasCommands.GetHomePosition(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, 0, 0, 0, 0, 0, 0, 0);

            SendMessage(msg);
        }
コード例 #9
0
        public void LowerLandingGear()
        {
            var msg = UasCommands.AirframeConfiguration(_connectedUasManager.Active.Uas.SystemId, _connectedUasManager.Active.Uas.ComponentId, -1, 0 /* down */, float.NaN, float.NaN, float.NaN, float.NaN, float.NaN);

            _connectedUasManager.Active.Transport.SendMessage(msg);
        }
コード例 #10
0
        public void StartTest()
        {
            var cmd = UasCommands.DoMotorTest(_mgr.Active.Uas.SystemId, _mgr.Active.Uas.ComponentId, 1, (float)MotorTestThrottleType.MotorTestThrottlePercent, 25, 5, 4, (float)MotorTestOrder.Board);

            _mgr.Active.Transport.SendMessage(cmd);
        }