public MissionPlannerLogReader(string filename, bool activeLog, IMavLinkListener callback)
 {
     this.FileName = filename;
     this.logreadmode = true;
     this.IsOpen = false;
     this.activeLog = activeLog;
     this.callback = callback;
 }
 public MissionPlannerLiveConnector(string hostIP, string port, IMavLinkListener callback)
 {
     this.hostIP = hostIP;
     this.port = port;
     this.FileName = "";
     this.IsOpen = false;
     this.Position = 0;
     this.callback = callback;
 }
Exemplo n.º 3
0
 public void NewMission(Location loc, Airframe plane, User user, Camera camera, IMavLinkListener callback, IVideoController videoController)
 {
     frmCreateMission createMission = new frmCreateMission();
     if (createMission.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         IsLive = createMission.IsLive;
         if (createMission.IsLive)
         {
             missionReader = new MissionPlannerLiveConnector("127.0.0.1", "56781", callback);
             if (missionReader.Open(false, DateTime.Now))
             {
                 mission = new Mission(loc, plane, user, camera, createMission.Description, createMission.VideoFile, createMission.LogFile);
                 this.videoController = videoController;
             }
         }
         else
         {
             if (File.Exists(createMission.LogFile) && File.Exists(createMission.VideoFile))
             {
                 mission = new Mission(loc, plane, user, camera, createMission.Description, createMission.VideoFile, createMission.LogFile);
                 missionReader = new MissionPlannerLogReader(createMission.LogFile, false, callback);
                 this.videoController = videoController;
             }
         }
     }
 }