Fixed problem with changing the modifying the profile on the fly!
This commit is contained in:
@@ -2619,14 +2619,19 @@ namespace ASCOM.Meade.net
|
|||||||
|
|
||||||
private void WriteProfile()
|
private void WriteProfile()
|
||||||
{
|
{
|
||||||
var profileProperties = new ProfileProperties
|
var changed = false;
|
||||||
{
|
|
||||||
TraceLogger = Tl.Enabled,
|
|
||||||
ComPort = ComPort,
|
|
||||||
GuideRateArcSecondsPerSecond = GuideRate
|
|
||||||
};
|
|
||||||
|
|
||||||
SharedResourcesWrapper.WriteProfile(profileProperties);
|
var profileProperties = SharedResourcesWrapper.ReadProfile();
|
||||||
|
|
||||||
|
|
||||||
|
if (Math.Abs(profileProperties.GuideRateArcSecondsPerSecond - GuideRate) > 0.0000001)
|
||||||
|
{
|
||||||
|
changed = true;
|
||||||
|
profileProperties.GuideRateArcSecondsPerSecond = GuideRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (changed)
|
||||||
|
SharedResourcesWrapper.WriteProfile(profileProperties);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user