Beispiel #1
0
        private void statusToogleButton_Click(object sender, EventArgs e)
        {
            switch (drone.Data.State)
            {
            case DroneState.Reset:
            case DroneState.Stopped:
                drone.SendClearStatus();
                break;

            case DroneState.Idle:
                drone.SendArm();
                break;

            case DroneState.Armed:
            case DroneState.Flying:
                drone.SendDisarm();
                break;
            }
        }
Beispiel #2
0
        private void statusToogleButton_Click(object sender, EventArgs e)
        {
            switch (drone.Data.State)
            {
            case DroneState.Reset:
            case DroneState.Stopped:
                Log.Info("Clear status by user input with status button");
                drone.SendClearStatus();
                break;

            case DroneState.Idle:
                Log.Info("Arm by user input with status button");
                drone.SendArm();
                break;

            case DroneState.Armed:
            case DroneState.Flying:
                Log.Info("Disarm by user input with status button");
                drone.SendDisarm();
                break;
            }
        }