Added extra logging.

This commit is contained in:
2021-04-24 19:20:05 +01:00
parent fdd008fcfb
commit 53abdba374
+22 -15
View File
@@ -419,23 +419,30 @@ namespace ASCOM.Meade.net
SetTelescopePrecision("Connect"); SetTelescopePrecision("Connect");
LogMessage("Connected Set", $"SendDateTime: {SendDateTime}");
if (SendDateTime) if (SendDateTime)
{ {
if (SharedResourcesWrapper.ProductName == TelescopeList.LX200GPS) if (SharedResourcesWrapper.ProductName == TelescopeList.LX200GPS)
{ {
LogMessage("Connected Set", $"LX200GPS Detecting if daylight savings message on screen: {SendDateTime}");
var displayText = Action("Handbox", "readdisplay"); var displayText = Action("Handbox", "readdisplay");
if (displayText.Contains("Daylight")) if (displayText.Contains("Daylight"))
{ {
LogMessage("Connected Set", $"LX200GPS Setting Date time and bypassing settings screens: {SendDateTime}");
BypassHandboxEntryForAutostarII(); BypassHandboxEntryForAutostarII();
} }
else else
{ {
LogMessage("Connected Set", $"LX200GPS Sending current date and time: {SendDateTime}");
SendCurrentDateTime("Connect"); SendCurrentDateTime("Connect");
LogMessage("Connected Set", $"LX200GPS Attempting manual bypass of prompts: {SendDateTime}");
ApplySkipAutoStarPrompts("Connect");
} }
} }
else else
{ {
LogMessage("Connected Set", $"Autostar Attempting manual bypass of prompts");
ApplySkipAutoStarPrompts("Connect"); ApplySkipAutoStarPrompts("Connect");
SendCurrentDateTime("Connect"); SendCurrentDateTime("Connect");
} }
@@ -479,20 +486,20 @@ namespace ASCOM.Meade.net
private void ApplySkipAutoStarPrompts(string connect) private void ApplySkipAutoStarPrompts(string connect)
{ {
//if (SharedResourcesWrapper.ProductName == TelescopeList.LX200GPS) if (SharedResourcesWrapper.ProductName == TelescopeList.LX200GPS)
//{ {
// var displayText = Action("Handbox", "readdisplay"); var displayText = Action("Handbox", "readdisplay");
// if (displayText.Contains("Daylight")) if (displayText.Contains("Daylight"))
// { {
// for (var i = 0; i < 3; i++) for (var i = 0; i < 3; i++)
// { {
// Action("Handbox", "enter"); Action("Handbox", "enter");
// _utilities.WaitForMilliseconds(2000); _utilities.WaitForMilliseconds(2000);
// } }
// } }
//} }
//else if (SharedResourcesWrapper.ProductName == TelescopeList.Autostar497) else if (SharedResourcesWrapper.ProductName == TelescopeList.Autostar497)
//{ {
var displayText = Action("Handbox", "readdisplay"); var displayText = Action("Handbox", "readdisplay");
if (displayText.Contains("Press 0 to Alignor MODE for Menu")) if (displayText.Contains("Press 0 to Alignor MODE for Menu"))
{ {
@@ -502,7 +509,7 @@ namespace ASCOM.Meade.net
_utilities.WaitForMilliseconds(500); _utilities.WaitForMilliseconds(500);
} }
} }
//} }
} }
private void SetTelescopePrecision(string propertyName) private void SetTelescopePrecision(string propertyName)