Fixed problem with changing the modifying the profile on the fly!

This commit is contained in:
2021-04-24 13:07:42 +01:00
parent 9c5620edee
commit 6ac80c408c
+11 -6
View File
@@ -2619,13 +2619,18 @@ namespace ASCOM.Meade.net
private void WriteProfile() private void WriteProfile()
{ {
var profileProperties = new ProfileProperties var changed = false;
{
TraceLogger = Tl.Enabled,
ComPort = ComPort,
GuideRateArcSecondsPerSecond = GuideRate
};
var profileProperties = SharedResourcesWrapper.ReadProfile();
if (Math.Abs(profileProperties.GuideRateArcSecondsPerSecond - GuideRate) > 0.0000001)
{
changed = true;
profileProperties.GuideRateArcSecondsPerSecond = GuideRate;
}
if (changed)
SharedResourcesWrapper.WriteProfile(profileProperties); SharedResourcesWrapper.WriteProfile(profileProperties);
} }
#endregion #endregion