/// <summary> /// constructor /// </summary> public robotSurveyorThread( WaitCallback callback, robotSurveyor state) { if (callback == null) throw new ArgumentNullException("callback"); _callback = callback; this.state = state; }
/// <summary> /// constructor /// </summary> public robotSurveyorThread( WaitCallback callback, robotSurveyor state) { if (callback == null) { throw new ArgumentNullException("callback"); } _callback = callback; this.state = state; }
/// <summary> /// /// </summary> /// <param name="stereo_camera_IP">IP address of the SVS</param> /// <param name="leftport">port number of the left camera</param> /// <param name="rightport">port number of the right camera</param> public MainWindow ( string stereo_camera_IP, int leftport, int rightport): base (Gtk.WindowType.Toplevel) { Build (); robot = new robotSurveyor(); this.stereo_camera_IP = stereo_camera_IP; string version = String.Format("{0}", AssemblyVersion); Console.WriteLine("surveyorstereo GUI version " + version); Console.WriteLine("SVS IP: " + stereo_camera_IP.ToString()); Console.WriteLine("Left camera port: " + leftport.ToString()); Console.WriteLine("Right camera port: " + rightport.ToString()); //SaveHpolarLookup(); if (BaseVisionStereo.IsWindows()) zip_utility = "zip"; byte[] img = new byte[image_width * image_height * 3]; Bitmap left_bmp = new Bitmap(image_width, image_height, System.Drawing.Imaging.PixelFormat.Format24bppRgb); Bitmap right_bmp = new Bitmap(image_width, image_height, System.Drawing.Imaging.PixelFormat.Format24bppRgb); sluggish.utilities.BitmapArrayConversions.updatebitmap_unsafe(img, left_bmp); sluggish.utilities.BitmapArrayConversions.updatebitmap_unsafe(img, right_bmp); GtkBitmap.setBitmap(left_bmp, leftimage); GtkBitmap.setBitmap(right_bmp, rightimage); stereo_camera = new SurveyorVisionStereoGtk(stereo_camera_IP, leftport, rightport, broadcast_port, fps, this); stereo_camera.temporary_files_path = temporary_files_path; stereo_camera.recorded_images_path = recorded_images_path; stereo_camera.display_image[0] = leftimage; stereo_camera.display_image[1] = rightimage; stereo_camera.Run("M"); txtLogging.Text = path_identifier; txtReplay.Text = replay_path_identifier; motors_active = true; starting = false; // enable motors //SendCommand("M"); }