Esempio n. 1
0
        public void Update_helpText()
        {
            HUD.AppendLine("[!]alt|[^]ctrl|[+]shift|[#]super");
            HUD.AppendLine(string.Format("Control: [^M]otor={0}|", config.WRITE_dataToMotors));
            HUD.AppendLine(string.Format("MotorSpeedControl: [M]{0}", config.motorSpeedControl));
            HUD.AppendLine(string.Format("Read: [+M]otor={0}|[+C]amera={1}", config.READ_dataFromMotors, config.ReadCameraStream));
            HUD.AppendLine(string.Format("PositionLock: [Tab]={0}|[numbers]={1}:{2}",
                                         config.player.PositionLockActive,
                                         (int)config.player.PositionLock, config.player.PositionLock
                                         ));
            HUD.AppendLine(string.Format("RoboticArmUpdatingFromAngle: [F5,F6,F7]={0}",
                                         ra.angleType
                                         ));
            HUD.AppendLine(string.Format("roboticArmPostureOnCameraCapture: [F8]={0}",
                                         config.roboticArmPostureOnCameraCapture
                                         ));
            HUD.AppendLine("");
            HUD.AppendLine("CameraArtificialDelay = " + config.cameraArtificialDelay.ToString());
            if (config.cameraArtificialDelay == true)
            {
                HUD.AppendLine("actual queue frame length = " + queuePixelData.Count().ToString());
                HUD.AppendLine("setuped cameraFrameQueueLength = " + config.cameraFrameQueueLength.ToString());

                HUD.AppendLine(string.Format("Actual artificial delay = {0,9:F4} [ms]", qAct.TotalMilliseconds));
            }


            HUD.AppendLine(string.Format("Status: [Camera={0}][Motors={1}][SPI={2}]",
                                         C_State.baslerCam,
                                         C_State.mot,
                                         C_State.Spi
                                         ));


            // may be in config constructor
            string name = "No camera connected - please connect the camera and restart telepresence!";

            if (C_State.FURTHER(e_stateBaslerCam.initializing))
            {
                name = config.cameraControl.camera.CameraInfo[Basler.Pylon.CameraInfoKey.DeviceType] + " " +
                       config.cameraControl.camera.CameraInfo[Basler.Pylon.CameraInfoKey.ModelName]
                ;
                HUD.AppendLine("Camera: " + name);
                HUD.AppendLine(string.Format(
                                   "Camera: [Connected={0}], [Open={1}], [Grabbing={2}]",
                                   config.cameraControl.camera.IsConnected,
                                   config.cameraControl.camera.IsOpen,
                                   config.cameraControl.camera.StreamGrabber.IsGrabbing
                                   ));
                HUD.AppendLine(string.Format("[U]=[textureConversionAlgorithm={0}]", textureConversionAlgorithm));
                HUD.AppendLine(string.Format("[+][-]=[ExposureTime={0:F3}ms]",
                                             config.cameraControl.ExposureTime / 1000));
            }


            HUD.AppendLine("");
            Vector3 pos;
            Vector3 rot;

            pos = config.player.scout.Position;
            HUD.AppendLine(string.Format("scout [XYZ]: [{0,7:0.00}|{1,7:0.00}|{2,7:0.00}]",
                                         pos[0], pos[1], pos[2]
                                         ));
            rot = config.player.body.YawPitchRoll;
            HUD.AppendLine(string.Format("body YawPitchRoll [Yaw|Pitch|Roll]: [{0,7:0.00}|{1,7:0.00}|{2,7:0.00}]",
                                         rot[0], rot[1], rot[2]
                                         ));

            pos = config.player.hmd.Position;
            HUD.AppendLine(string.Format("hmd [XYZ]: [{0,7:0.00}|{1,7:0.00}|{2,7:0.00}]",
                                         pos[0], pos[1], pos[2]
                                         ));
            rot = config.player.hmd.YawPitchRoll;
            HUD.AppendLine(string.Format("hmd [Yaw|Pitch|Roll]: [{0,7:0.00}|{1,7:0.00}|{2,7:0.00}]",
                                         rot[0], rot[1], rot[2]
                                         ));

            pos = config.player.Position;
            HUD.AppendLine(string.Format("Player [XYZ]: [{0,7:0.00}|{1,7:0.00}|{2,7:0.00}]",
                                         pos[0], pos[1], pos[2]
                                         ));
            rot = config.player.YawPitchRoll;
            HUD.AppendLine(string.Format("Player [Yaw|Pitch|Roll]: [{0,7:0.00}|{1,7:0.00}|{2,7:0.00}]",
                                         rot[0], rot[1], rot[2]
                                         ));
        }