private void AddMetaData( ImageMetaData metaData, CaptureSequence sequence, DateTime start, RMS rms, string targetName) { metaData.Image.ExposureStart = start; metaData.Image.Binning = sequence.Binning.Name; metaData.Image.ExposureNumber = sequence.ProgressExposureCount; metaData.Image.ExposureTime = sequence.ExposureTime; metaData.Image.ImageType = sequence.ImageType; metaData.Image.RecordedRMS = rms; metaData.Target.Name = targetName; // Fill all available info from profile metaData.FromProfile(profileService.ActiveProfile); metaData.FromTelescopeInfo(telescopeInfo); metaData.FromFilterWheelInfo(filterWheelInfo); metaData.FromRotatorInfo(rotatorInfo); metaData.FromFocuserInfo(focuserInfo); metaData.FromWeatherDataInfo(weatherDataInfo); metaData.FilterWheel.Filter = sequence.FilterType?.Name ?? metaData.FilterWheel.Filter; }
public void FromFilterWheelInfoConnectedTest() { var info = new FilterWheelInfo() { Connected = true, Name = "TestFilterWheel", SelectedFilter = new FilterInfo { Name = "Red" } }; var sut = new ImageMetaData(); sut.FromFilterWheelInfo(info); Assert.AreEqual("TestFilterWheel", sut.FilterWheel.Name); Assert.AreEqual("Red", sut.FilterWheel.Filter); }