public void Reboot() { var Cmd = new AudacityCommand(); Cmd.Module = (UInt16)module_t.modSystem; Cmd.Action = (UInt16)action_t.actSystemReboot; SendCommand(Cmd); }
public void CameraCapture() { var Cmd = new AudacityCommand(); Cmd.Module = (UInt16)module_t.modCamera; Cmd.Action = (UInt16)action_t.actCameraCapture; SendCommand(Cmd); }
public void Stop() { var Cmd = new AudacityCommand(); Cmd.Module = (UInt16)module_t.modRemotePilot; Cmd.Action = (UInt16)action_t.actRemotePilotStop; SendCommand(Cmd); }
public void Right(UInt16 ADegrees) { var Cmd = new AudacityCommand(); Cmd.Module = (UInt16)module_t.modRemotePilot; Cmd.Action = (UInt16)action_t.actRemotePilotRight; Cmd.Param1 = ADegrees; SendCommand(Cmd); }
public void Backward(UInt16 AAmount) { var Cmd = new AudacityCommand(); Cmd.Module = (UInt16)module_t.modRemotePilot; Cmd.Action = (UInt16)action_t.actRemotePilotBackward; Cmd.Param1 = AAmount; SendCommand(Cmd); }
private void SendCommand(AudacityCommand ACmd) { try { TcpClient client = new TcpClient(IP, Port); NetworkStream ns = client.GetStream(); var cmdstr = ACmd.ToBinaryCommandStr(); ns.Write(cmdstr, 0, cmdstr.Length); client.Close(); } catch (Exception e) { Console.WriteLine(e.ToString()); } }