public AutoCalibratedModifierStrategy(CaptureConfig captureConfig, Point target) : base(captureConfig, target) { var readingsRepository = new CalibrationReadingsRepository(); var readings = readingsRepository.Read(); if (!readings.ContainsKey(captureConfig.Resolution)) { readings.Add(captureConfig.Resolution, new AxesCalibrationReadings()); Log.WarnFormat("Failed to load any calibration readings for {0}", captureConfig.Resolution); } _calibratedReadings = readings[captureConfig.Resolution]; Log.InfoFormat( "Using {0} horizontal, {1} vertial calibration readings for {2}" , _calibratedReadings.Horizontal.Count , _calibratedReadings.Vertical.Count , captureConfig.Resolution); }
public AutoCalibratedModifierStrategy(CaptureConfig captureConfig, Point target) : base(captureConfig, target) { var readingsRepository = new CalibrationReadingsRepository(); var readings = readingsRepository.Read(); if (readings == null) { Log.WarnFormat("No calibration readings found for pan tilt"); readings = new PanTiltCalibrationReadings(); } if (!readings.ContainsKey(captureConfig.Resolution)) { readings.Add(captureConfig.Resolution, new AxesCalibrationReadings()); Log.WarnFormat("Failed to load any calibration readings for {0}", captureConfig.Resolution); } _calibratedReadings = readings[captureConfig.Resolution]; Log.InfoFormat( "Using {0} horizontal, {1} vertial calibration readings for {2}" , _calibratedReadings.Horizontal.Count , _calibratedReadings.Vertical.Count , captureConfig.Resolution); }