Upgraded the error handling to ensure that all serial commands are executed after checking that there is a connection open.

This commit is contained in:
2019-05-20 17:06:53 +01:00
parent 7cb50de30d
commit 678b5f1ece
3 changed files with 121 additions and 46 deletions
+7 -1
View File
@@ -109,7 +109,7 @@ namespace ASCOM.Meade.net
/// </summary>
public Focuser()
{
tl = new TraceLogger("", "Meade.net");
tl = new TraceLogger("", "Meade.net.focusser");
ReadProfile(); // Read device configuration from the ASCOM Profile store
tl.LogMessage("Focuser", "Starting initialisation");
@@ -136,8 +136,10 @@ namespace ASCOM.Meade.net
/// </summary>
public void SetupDialog()
{
tl.LogMessage("SetupDialog", "Opening setup dialog");
SharedResources.SetupDialog();
ReadProfile();
tl.LogMessage("SetupDialog", "complete");
}
public ArrayList SupportedActions
@@ -297,6 +299,9 @@ namespace ASCOM.Meade.net
public void Halt()
{
tl.LogMessage("Halt", "Halting");
CheckConnected("Halt");
SharedResources.SendBlind(":FQ#");
//:FQ# Halt Focuser Motion
//Returns: Nothing
@@ -348,6 +353,7 @@ namespace ASCOM.Meade.net
public void Move(int Position)
{
tl.LogMessage("Move", Position.ToString());
CheckConnected("Move");
//todo implement backlash compensation
//todo implement direction reverse