Esempio n. 1
0
        private void SendUpdates()
        {
            var status = new CalibrationStatus
            {
                topLeftCalibrated     = DisplayCalibration.IsCornerCalibrated[(int)Corner.TopLeft],
                bottomLeftCalibrated  = DisplayCalibration.IsCornerCalibrated[(int)Corner.BottomLeft],
                topRightCalibrated    = DisplayCalibration.IsCornerCalibrated[(int)Corner.TopRight],
                bottomRightCalibrated = DisplayCalibration.IsCornerCalibrated[(int)Corner.BottomRight],
                calibrationStatus     = DisplayCalibration.CalibrationProgress,
                isCalibrating         = DisplayCalibration.IsCalibrating
            };

            RemoteSurfaceConnection.SendCommand(Globals.DefaultSurfaceName, "admin-cmd-calibration-status", JsonUtility.ToJson(status));
        }
        private void Update()
        {
            // TODO: dynamic calibration debug info?

            _monitor.UpdateStability(CalibrationParams.PositionOffset, CalibrationParams.RotationOffset);
            RemoteSurfaceConnection.SendCommand(Globals.DefaultSurfaceName, "debug-calibration", JsonUtility.ToJson(new Packet
            {
                posOffsetX = CalibrationParams.PositionOffset.x,
                posOffsetY = CalibrationParams.PositionOffset.y,
                posOffsetZ = CalibrationParams.PositionOffset.z,

                rotOffsetX = CalibrationParams.RotationOffset.x,
                rotOffsetY = CalibrationParams.RotationOffset.y,
                rotOffsetZ = CalibrationParams.RotationOffset.z,
                rotOffsetW = CalibrationParams.RotationOffset.w,

                lastUpdateTime = CalibrationParams.LastCalibrationTime
            }));
        }
Esempio n. 3
0
        private IEnumerator SendSettings()
        {
            while (enabled)
            {
                var settings = new OvrSettings
                {
                    Gain                    = _camera.Gain,
                    Exposure                = _camera.Exposure,
                    BLC                     = _camera.BLC,
                    CameraGap               = _gapController.Gap,
                    AutoContrast            = _camera.AutoContrast,
                    AutoContrastAutoGain    = _camera.AutoContrastAutoGain,
                    AutoContrastClipPercent = _camera.AutoContrastClipHistPercent,
                    AutoContrastMax         = _camera.AutoContrastMax,
                    GapAutoAdjust           = _gapController.AutoAdjust
                };

                RemoteSurfaceConnection.SendCommand("surface", "debug-camera-properties", JsonUtility.ToJson(settings));

                yield return(new WaitForSecondsRealtime(1f));
            }
        }
Esempio n. 4
0
 private void Update()
 {
     RemoteSurfaceConnection.SendCommand("Surface", "debug-cm-val-" + MonitorName,
                                         string.Format("{{\"stability\": {0}, \"position\": {1}, \"rotation\": {2} }}", _monitor.Stability, _monitor.PositionStability, _monitor.RotationStability));
 }