private void Form1_Shown(object sender, EventArgs e) { updateCommPortCombos(); comboResolution.SelectedIndex = 0; Matrix <double> test = new Matrix <double>(3, 3); LatestCamIntrinsics = new IntrinsicCameraParameters(); // initializing the intrinsics matrix to the identity LatestCamIntrinsics.IntrinsicMatrix.SetIdentity(); //LatestCamIntrinsics.DistortionCoeffs = new Matrix<double>(4, 1); LatestCamIntrinsics.DistortionCoeffs.SetZero(); gps = null; calibrator = null; imu = null; comboResolution.SelectedIndex = 2; // start the timer timer1.Start(); }
private void Form1_FormClosed(object sender, FormClosedEventArgs e) { timer1.Stop(); if (recorder != null) { if (recorder.RecordingThreadActive) { recorder.stopCapturing(); } } if (gps != null) { if (gps.NMEAThreadActive) { gps.stopReceiver(); if (gps.CommPort.IsOpen) { gps.CommPort.Close(); } } } if (imu != null) { if (imu.Flag_CommsActive) { imu.stopComms(); } imu = null; } }
private void button9_Click(object sender, EventArgs e) { if (imu != null) { if (imu.Flag_CommsActive) { imu.stopComms(); } imu = null; textBox6.Text = "Disconnected"; } }
private void button8_Click_1(object sender, EventArgs e) { if (comboBox2.Items.Count > 0) { string imuport = (string)comboBox2.Items[comboBox2.SelectedIndex]; imu = new IMUCommsDevice(imuport); // starting imu communications imu.startComms(); textBox6.Text = "Connected"; } }
// A timer used to sample the IMU during the intervals betweem frame captures //private System.Timers.Timer IMUSamplingTimer; public Flea3Recorder(GPSReceiver gpsReceiver, IMUCommsDevice imu) { int i; IMUcomms = imu; // 1. creating the camera object Cam = new ManagedCamera(); // 2. creating the bus manager in order to handle (potentially) // multiple cameras BusMgr = new ManagedBusManager(); // 3. retrieving the List of all camera ids connected to the bus CamIDs = new List <ManagedPGRGuid>(); int camCount = (int)BusMgr.GetNumOfCameras(); for (i = 0; i < camCount; i++) { ManagedPGRGuid guid = BusMgr.GetCameraFromIndex((uint)i); CamIDs.Add(guid); } // 4. assigning values to properties GpsReceiver = gpsReceiver; // 5. init flags RecordingThreadActive = false; RecordToFile = false; OutOfRecordingThread = OutOfDumpingThread = true; // 6. Creating the Frame data queue FrameQueue = new ManagedImageRollingBuffer(MAX_FRAMEQUEUE_LEN); }
// A timer used to sample the IMU during the intervals betweem frame captures //private System.Timers.Timer IMUSamplingTimer; public Flea3Recorder(GPSReceiver gpsReceiver, IMUCommsDevice imu) { int i; IMUcomms = imu; // 1. creating the camera object Cam = new ManagedCamera(); // 2. creating the bus manager in order to handle (potentially) // multiple cameras BusMgr = new ManagedBusManager(); // 3. retrieving the List of all camera ids connected to the bus CamIDs = new List<ManagedPGRGuid>(); int camCount = (int)BusMgr.GetNumOfCameras(); for (i = 0; i < camCount; i++) { ManagedPGRGuid guid = BusMgr.GetCameraFromIndex((uint)i); CamIDs.Add(guid); } // 4. assigning values to properties GpsReceiver = gpsReceiver; // 5. init flags RecordingThreadActive = false; RecordToFile = false; OutOfRecordingThread = OutOfDumpingThread = true; // 6. Creating the Frame data queue FrameQueue = new ManagedImageRollingBuffer(MAX_FRAMEQUEUE_LEN); }
private void Form1_Shown(object sender, EventArgs e) { updateCommPortCombos(); comboResolution.SelectedIndex = 0; Matrix<double> test = new Matrix<double>(3, 3); LatestCamIntrinsics = new IntrinsicCameraParameters(); // initializing the intrinsics matrix to the identity LatestCamIntrinsics.IntrinsicMatrix.SetIdentity(); //LatestCamIntrinsics.DistortionCoeffs = new Matrix<double>(4, 1); LatestCamIntrinsics.DistortionCoeffs.SetZero(); gps = null; calibrator = null; imu = null; comboResolution.SelectedIndex = 2; // start the timer timer1.Start(); }
private void Form1_FormClosed(object sender, FormClosedEventArgs e) { timer1.Stop(); if (recorder != null) if (recorder.RecordingThreadActive) recorder.stopCapturing(); if (gps!=null) if (gps.NMEAThreadActive) { gps.stopReceiver(); if (gps.CommPort.IsOpen) gps.CommPort.Close(); } if (imu != null) { if (imu.Flag_CommsActive) imu.stopComms(); imu = null; } }
private void button9_Click(object sender, EventArgs e) { if (imu != null) { if (imu.Flag_CommsActive) imu.stopComms(); imu = null; textBox6.Text = "Disconnected"; } }