Fixed the defect when one instance of the driver gets parked, the info is shared to the other instances.
This commit is contained in:
@@ -141,6 +141,7 @@
|
||||
<Compile Include="LocalServer.cs" />
|
||||
<Compile Include="MeadeTelescopeBase.cs" />
|
||||
<Compile Include="ParkedBehaviour.cs" />
|
||||
<Compile Include="ParkedPosition.cs" />
|
||||
<Compile Include="ProfileFactory.cs" />
|
||||
<Compile Include="ProfileProperties.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace ASCOM.Meade.net
|
||||
{
|
||||
public class ParkedPosition
|
||||
{
|
||||
public double Altitude { get; set; }
|
||||
public double Azimuth { get; set; }
|
||||
public double RightAscension { get; set; }
|
||||
public double Declination { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -493,5 +493,15 @@ namespace ASCOM.Meade.net
|
||||
Count = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetParked(bool atPark, ParkedPosition parkedPosition)
|
||||
{
|
||||
IsParked = atPark;
|
||||
ParkedPosition = parkedPosition;
|
||||
}
|
||||
|
||||
public static bool IsParked { get; private set; }
|
||||
|
||||
public static ParkedPosition ParkedPosition { get; private set; }
|
||||
}
|
||||
}
|
||||
@@ -27,6 +27,10 @@ namespace ASCOM.Meade.net.Wrapper
|
||||
void SetupDialog();
|
||||
void WriteProfile(ProfileProperties profileProperties);
|
||||
void ReadCharacters(int throwAwayCharacters);
|
||||
|
||||
void SetParked(bool atPark, ParkedPosition parkedPosition);
|
||||
bool IsParked { get; }
|
||||
ParkedPosition ParkedPosition { get; }
|
||||
}
|
||||
|
||||
public class SharedResourcesWrapper : ISharedResourcesWrapper
|
||||
@@ -99,5 +103,14 @@ namespace ASCOM.Meade.net.Wrapper
|
||||
{
|
||||
SharedResources.WriteProfile(profileProperties);
|
||||
}
|
||||
|
||||
public void SetParked(bool atPark, ParkedPosition parkedPosition)
|
||||
{
|
||||
SharedResources.SetParked(atPark, parkedPosition);
|
||||
}
|
||||
|
||||
public bool IsParked => SharedResources.IsParked;
|
||||
|
||||
public ParkedPosition ParkedPosition => SharedResources.ParkedPosition;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user