示例#1
0
 private void SendCommand(string command_str)
 {
     if (stereo_camera.Record)
     {
         BaseVisionStereo.LogEvent(DateTime.Now, command_str, teleoperation_log);
     }
     stereo_camera.SendCommand(0, command_str);
 }
示例#2
0
        /// <summary>
        /// Toggles logging of images on or off
        /// </summary>
        /// <param name="enable"></param>
        private void ToggleLogging(bool enable)
        {
            Console.WriteLine("");
            Console.WriteLine("");

            if (enable)
            {
                Console.WriteLine("Logging Enabled");
            }
            else
            {
                Console.WriteLine("Logging Disabled");
            }

            Console.WriteLine("");
            Console.WriteLine("");

            stereo_camera.recorded_images_path = log_path;

            // reset the frame number
            if (!stereo_camera.replaying_actions)
            {
                if (enable == true)
                {
                    if ((txtLogging.Text != "") &&
                        (txtLogging.Text != null))
                    {
                        path_identifier = txtLogging.Text;
                    }

                    BaseVisionStereo.LogEvent(DateTime.Now, "BEGIN", teleoperation_log);
                    // clear any previous recorded data
                    stereo_camera.RecordFrameNumber = 0;
                }

                stereo_camera.Record = enable;
            }

            if (enable == false)
            {
                BaseVisionStereo.LogEvent(DateTime.Now, "END", teleoperation_log);

                // compress the recorded images
                BaseVisionStereo.CompressRecordedData(
                    zip_utility,
                    path_identifier,
                    log_path);
            }
        }