Skip to content

Commit fac464e

Browse files
V6.6.7.2 : Fixed FindHome and AtHome functions (#61)
* V6.6.6.9 Updates Fixed some bugs related to input formats and timeouts. Ran Conform for ASCOM 7. Added TRK stepper display. * V6.6.7.1 ASCOM Driver Updates * Fixed incorrect merge * V1.1.8.0 Updates - Made Autohoming from connection screen use the same settings as the homing commands from the main UI and Settings dialog. * V6.6.7.2 Updates - FindHome function fixed and AtHome implemented.
1 parent de77c83 commit fac464e

File tree

4 files changed

+37
-22
lines changed

4 files changed

+37
-22
lines changed

ASCOM.Driver/OpenAstroTracker/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// Build Number
2222
// Revision
2323
//
24-
[assembly: AssemblyVersion("6.6.7.1")]
25-
[assembly: AssemblyFileVersion("6.6.7.1")]
24+
[assembly: AssemblyVersion("6.6.7.2")]
25+
[assembly: AssemblyFileVersion("6.6.7.2")]
2626

2727
[assembly: ComVisibleAttribute(false)]

ASCOM.Driver/OpenAstroTracker/README.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
+--------------------------------------------------------------------------+
22
| |
3-
| OpenAstroTracker ASCOM Driver V6.6.7.1 Pre-Release |
4-
| Published: 28. February 2025 |
3+
| OpenAstroTracker ASCOM Driver V6.6.7.2 Release |
4+
| Published: 20. April 2025 |
55
| |
66
+--------------------------------------------------------------------------+
77

@@ -33,6 +33,9 @@ Support
3333

3434
Testing
3535
-------
36+
* 6.6.7.2 Conformance Test (2025-Apr-20)
37+
- Telescope: All tests passed, no errors, no warnings, 18 issues (all expected).
38+
3639
* 6.6.7.1 Conformance Test (2025-Feb-28)
3740
- Telescope: All tests passed, no errors, no warnings, 23 issues (all expected).
3841

ASCOM.Driver/TelescopeDriver/Driver.cs

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,13 @@ public bool AtHome
316316
{
317317
get
318318
{
319-
// This property must be False if the telescope does not support homing.
320-
// TODO : We'll try to implement homing later.
321-
LogMessage(LoggingFlags.Scope, "AtHome Get => false");
322-
return false;
319+
LogMessage(LoggingFlags.Scope, "AtHome Get, query mount");
320+
var cmdResult = CommandString(":GX#,#"); // Get status and split
321+
LogMessage(LoggingFlags.Scope, "AtHome Get, mount replied " + cmdResult);
322+
var result = cmdResult.Split(','); // Get status and split
323+
var atHome = result[2] == "0" && result[3] == "0"; // Check if the mount is at home position
324+
LogMessage(LoggingFlags.Scope, "AtHome Get => " + atHome);
325+
return atHome;
323326
}
324327
}
325328

@@ -576,18 +579,24 @@ public EquatorialCoordinateType EquatorialSystem
576579

577580
public void FindHome()
578581
{
579-
if (!AtPark)
580-
{
581-
LogMessage(LoggingFlags.Scope, "FindHome() called");
582-
CommandBlind(":hF");
583-
PollUntilZero(":GIS#,#");
584-
}
585-
else
586-
{
587-
LogMessage(LoggingFlags.Scope, "FindHome - Scope is parked");
588-
throw new ASCOM.ParkedException("FindHome");
589-
}
590-
}
582+
if (!AtPark)
583+
{
584+
if (!IsConnected)
585+
throw new ASCOM.NotConnectedException("FindHome");
586+
LogMessage(LoggingFlags.Scope, "FindHome() called, issuing :hF#");
587+
CommandBlind(":hF#");
588+
LogMessage(LoggingFlags.Scope, "FindHome - polling :GIS#");
589+
PollUntilZero(":GIS#,#");
590+
LogMessage(LoggingFlags.Scope, "FindHome -issuing :SHP#");
591+
CommandString(":SHP#,#"); // Set stepper positions to 0 (they might be off due to tracking).
592+
LogMessage(LoggingFlags.Scope, "FindHome - completed");
593+
}
594+
else
595+
{
596+
LogMessage(LoggingFlags.Scope, "FindHome - Scope is parked");
597+
throw new ASCOM.ParkedException("FindHome");
598+
}
599+
}
591600

592601
public double FocalLength
593602
{
@@ -1335,6 +1344,9 @@ private int PollUntilZero(string command)
13351344
while (retVal != "0")
13361345
{
13371346
retVal = CommandString(command);
1347+
LogMessage(LoggingFlags.Scope, $"PollUntilZero - Command: {command}, Response: {retVal}");
1348+
if (retVal == "0")
1349+
break;
13381350
Thread.Sleep(1000);
13391351
}
13401352

ASCOM.Driver/TelescopeDriver/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@
3535
// by using the '*' as shown below:
3636
//
3737
// TODO - Set your driver's version here
38-
[assembly: AssemblyVersion("6.6.7.1")]
39-
[assembly: AssemblyFileVersion("6.6.7.1")]
38+
[assembly: AssemblyVersion("6.6.7.2")]
39+
[assembly: AssemblyFileVersion("6.6.7.2")]

0 commit comments

Comments
 (0)