Added ability to skip the prompts initial connect, and added ability to send the date and time on initial connect

This commit is contained in:
2021-04-21 20:17:00 +01:00
parent 5538f51cf0
commit e4af93dd07
8 changed files with 207 additions and 54 deletions
+27
View File
@@ -418,6 +418,9 @@ namespace ASCOM.Meade.net
}
SetTelescopePrecision("Connect");
ApplySkipAutoStarPrompts("Connect");
SendCurrentDateTime("Connect");
}
else
{
@@ -447,6 +450,30 @@ namespace ASCOM.Meade.net
}
}
private void SendCurrentDateTime(string connect)
{
if (SendDateTime)
{
UTCDate = DateTime.UtcNow;
}
}
private void ApplySkipAutoStarPrompts(string connect)
{
if (SkipAutoStarPrompts)
{
var displayText = Action("Handbox", "readdisplay");
if (displayText.Contains("Daylight"))
{
for(var i = 0; i < 3; i++)
{
Action("Handbox", "enter");
_utilities.WaitForMilliseconds(2000);
}
}
}
}
private void SetTelescopePrecision(string propertyName)
{
switch (Precision.ToLower())