From 617faee9dd3ee01d46a32d8a2b2630e955d91d8f Mon Sep 17 00:00:00 2001 From: Colin Dawson Date: Sun, 7 Jul 2019 14:07:37 +0000 Subject: [PATCH] Merged in develop (pull request #8) Develop * Removed unwanted files * Adding git ignore file * Started working on getting the basic communications with the scope working. Working on routines to get and set the date and time in the handbox. * Switched the serial port over to using the .net frameworks serial port. Extracted the serial port into it's own class and created a simpler command processing mechanism. * Implemented AbortSlew and did some code tidy up. * Forced all code to 64-bit only, will make this 32/64 bit before release. Fixed issue in the SerialProcessor when setting the time, makes sure that there's no chance of thread stealing when pulling out the junk messages Added ConformanceResult.txt to show the progress of the driver development * Added code for the site latitude and started work on the longitude. * Added unit tests for reading and writing the utcDate. Fixed a couple of defects in the code that was setting the utcDate. * Corrected Longitude value range * Added support for UTC offset. * Pulse guiding support added * Added SiteLatitude unit tests * Added unit tests for SiteLongitude * Added unit tests for the new Pulse guide implementation. * Added support for AlignmentMode * Added support for AtPark and Park * Added support for parking the scope Added support for reading the scope Azimuth * Added support for reading Declination * Added 5 second timeout for the serial port. Fixed problem with the GW command not working on the Autostar 497. * Fixed broken unit test * Added support for altitude * Tidying up resharper warinings * Implemented RightAscension TargetRightAscension TargetDec SlewToCoord and SlewToCoordAsync * Sorted out the target RA and Dec exceptions to be compliant with ascom. * Implemented SlewToAltAz and SlewToAltAzAsync * Implemented SyncToTarget functionality * Implemented slew to target * Added support for MoveAxis * Added support for tracking rate * Added IFocuserV3 to the driver and made sure that it's registered for ASCOM as a focuser as well. * Fixed issue with Target RA and Dec loosing precision * Telescope driver now passes the Ascom conformance. * Upgraded driver version to 0.1 * Added explicit locks around all sequences of commands. * Basic implementation of the IFocusserV3 * Focuser passes validation, this makes the code V0.2 * Added support for CommandBlind and CommandString Modified the tracking rates to be setable. However, the get is now simulated. * Merged in feature/LocalServer (pull request #5) Feature/LocalServer * Major refactor. Switching over to a local server hub style driver allowing multiple programs to control the telescope at one time without the need for the POTH Hub * Unified the setup dialog * Implemented shared serial port, Both Telescope and Driver can connect at the same time. * Ported the focuser implementation from the non server based version. * Ported the telescope driver code. * Fixed problem with # not being stripped from the returned string ends. Fixed issue with RA being returned as degress rather than hours. * Telescope passes validation * Added a lock around the focuser move. * Reimplemented CommandBlind and CommandString * Corrected version information * Removed the Altitude support as there's a bug in the Autostar and Audiostar firmware * Added comments for all meade commands. Fixed the Site Lat and Long setters * Re instated the Altitude value and ran conformance for both the telescope and focuser. * Redesigned the Altitude and Azimuth readings to use the Right Ascension and Declination co-ordinates and perform the transformation using the date and site details from the scope. This will correct the problem of the Altitude reading from the handset being incorrect. * Added code to make sure that the scope returns values in high precision mode. * Fixed problem where SlewToAltAz didn't work correctly. Now uses the RA/Dec slew for everything, and converts the values as needed. * Upgraded the error handling to ensure that all serial commands are executed after checking that there is a connection open. * Added some code to the focuser connect to make it consistent with the telescope connect in that it will now test that the connection is to an Autostar. Upgraded the move code to make it less unreliable. * Added localisation support * First draft of the installer * Sorted out the registry settings needed to get the driver working properly on install. * Modified the solution to be able to create as 32-bit install that works on 64bit windows 10. * Added a call to activate when the setup dialog is shown. * Downgraded required .net to v4.0. Added suppoer for "Handbox" custom action Changes how the focuser in and out functions. Now sends multiple :F+/-# and multiple stop commands to help get over problems with the #909 missing commands. Added support for checking for the older firmware that does not support the guiding commands, so uses guide rate slew instead. * Slight modification to make sure that the focuser is poked less often * Moved develop onto version 0.7.0.0 * Added check for Ascom platform 6.4 SP 1 or higher. * Fixed issue with slew to RA/Dec not applying negative declinations properly. --- AstroMath.UnitTests/Properties/AssemblyInfo.cs | 4 ++-- FocuserTestConsole/Properties/AssemblyInfo.cs | 4 ++-- Meade.net.Setup/Config.wxi | 2 +- Meade.net.Setup/Product.wxs | 14 ++++++++++++-- Meade.net.Telescope/Properties/AssemblyInfo.cs | 4 ++-- Meade.net.Telescope/Telescope.cs | 16 ++++++++++++++-- Meade.net.focuser/Properties/AssemblyInfo.cs | 4 ++-- Meade.net/Properties/AssemblyInfo.cs | 4 ++-- TelescopeTestConsole/Properties/AssemblyInfo.cs | 4 ++-- 9 files changed, 39 insertions(+), 17 deletions(-) diff --git a/AstroMath.UnitTests/Properties/AssemblyInfo.cs b/AstroMath.UnitTests/Properties/AssemblyInfo.cs index 1ebc9b6..2c0f1a3 100644 --- a/AstroMath.UnitTests/Properties/AssemblyInfo.cs +++ b/AstroMath.UnitTests/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.6.0.0")] -[assembly: AssemblyFileVersion("0.6.0.0")] +[assembly: AssemblyVersion("0.7.0.0")] +[assembly: AssemblyFileVersion("0.7.0.0")] diff --git a/FocuserTestConsole/Properties/AssemblyInfo.cs b/FocuserTestConsole/Properties/AssemblyInfo.cs index b979463..1349406 100644 --- a/FocuserTestConsole/Properties/AssemblyInfo.cs +++ b/FocuserTestConsole/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.6.0.0")] -[assembly: AssemblyFileVersion("0.6.0.0")] +[assembly: AssemblyVersion("0.7.0.0")] +[assembly: AssemblyFileVersion("0.7.0.0")] diff --git a/Meade.net.Setup/Config.wxi b/Meade.net.Setup/Config.wxi index 0040fe9..8e64544 100644 --- a/Meade.net.Setup/Config.wxi +++ b/Meade.net.Setup/Config.wxi @@ -44,5 +44,5 @@ - + \ No newline at end of file diff --git a/Meade.net.Setup/Product.wxs b/Meade.net.Setup/Product.wxs index d9d14de..ce95dc0 100644 --- a/Meade.net.Setup/Product.wxs +++ b/Meade.net.Setup/Product.wxs @@ -12,8 +12,18 @@ - - + + + + + + + = "6.4.1"]]> + diff --git a/Meade.net.Telescope/Properties/AssemblyInfo.cs b/Meade.net.Telescope/Properties/AssemblyInfo.cs index dcf1e41..5376198 100644 --- a/Meade.net.Telescope/Properties/AssemblyInfo.cs +++ b/Meade.net.Telescope/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: // // TODO - Set your driver's version here -[assembly: AssemblyVersion("0.6.0.0")] -[assembly: AssemblyFileVersion("0.6.0.0")] +[assembly: AssemblyVersion("0.7.0.0")] +[assembly: AssemblyFileVersion("0.7.0.0")] diff --git a/Meade.net.Telescope/Telescope.cs b/Meade.net.Telescope/Telescope.cs index da76b38..bc7af47 100644 --- a/Meade.net.Telescope/Telescope.cs +++ b/Meade.net.Telescope/Telescope.cs @@ -190,6 +190,9 @@ namespace ASCOM.Meade.net case "mode": SharedResources.SendBlind(":EK9#"); break; + case "longMode": + SharedResources.SendBlind(":EK11#"); + break; case "goto": SharedResources.SendBlind(":EK24#"); break; @@ -1448,16 +1451,20 @@ namespace ASCOM.Meade.net { case "0": //We're slewing everything should be working just fine. + tl.LogMessage("DoSlewAsync", "Slewing to target"); break; case "1": //Below Horizon string belowHorizonMessage = SharedResources.ReadTerminated(); + tl.LogMessage("DoSlewAsync", $"Slew failed \"{belowHorizonMessage}\""); throw new ASCOM.InvalidOperationException(belowHorizonMessage); case "2": //Below Horizon string belowMinimumElevationMessage = SharedResources.ReadTerminated(); + tl.LogMessage("DoSlewAsync", $"Slew failed \"{belowMinimumElevationMessage}\""); throw new ASCOM.InvalidOperationException(belowMinimumElevationMessage); default: + tl.LogMessage("DoSlewAsync", $"Slew failed - unknown response \"{response}\""); throw new ASCOM.DriverException("This error should not happen"); } @@ -1492,6 +1499,8 @@ namespace ASCOM.Meade.net { utilities.WaitForMilliseconds(200); //be responsive to AbortSlew(); } + + tl.LogMessage("SlewToCoordinates", $"Slewing completed new coordinates Ra={RightAscension}, Dec={Declination}"); } public void SlewToCoordinatesAsync(double rightAscension, double declination) @@ -1631,9 +1640,12 @@ namespace ASCOM.Meade.net CheckConnected("TargetDeclination Set"); var dms = utilities.DegreesToDMS(value, "*", ":", ":", 2); - var s = value < 0 ? '-' : '+'; + var s = value < 0 ? string.Empty : "+"; - var result = SharedResources.SendChar($":Sd{s}{dms}#"); + var command = $":Sd{s}{dms}#"; + + tl.LogMessage("TargetDeclination Set", $"{command}"); + var result = SharedResources.SendChar(command); //:SdsDD*MM# //Set target object declination to sDD*MM or sDD*MM:SS depending on the current precision setting //Returns: diff --git a/Meade.net.focuser/Properties/AssemblyInfo.cs b/Meade.net.focuser/Properties/AssemblyInfo.cs index c0f0c5b..d74c566 100644 --- a/Meade.net.focuser/Properties/AssemblyInfo.cs +++ b/Meade.net.focuser/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: // // TODO - Set your driver's version here -[assembly: AssemblyVersion("0.6.0.0")] -[assembly: AssemblyFileVersion("0.6.0.0")] +[assembly: AssemblyVersion("0.7.0.0")] +[assembly: AssemblyFileVersion("0.7.0.0")] diff --git a/Meade.net/Properties/AssemblyInfo.cs b/Meade.net/Properties/AssemblyInfo.cs index cb667c7..502789e 100644 --- a/Meade.net/Properties/AssemblyInfo.cs +++ b/Meade.net/Properties/AssemblyInfo.cs @@ -21,7 +21,7 @@ using System.Runtime.InteropServices; // Build Number // Revision // -[assembly: AssemblyVersion("0.6.0.0")] -[assembly: AssemblyFileVersion("0.6.0.0")] +[assembly: AssemblyVersion("0.7.0.0")] +[assembly: AssemblyFileVersion("0.7.0.0")] [assembly: ComVisibleAttribute(false)] diff --git a/TelescopeTestConsole/Properties/AssemblyInfo.cs b/TelescopeTestConsole/Properties/AssemblyInfo.cs index 6db7d58..a358cd7 100644 --- a/TelescopeTestConsole/Properties/AssemblyInfo.cs +++ b/TelescopeTestConsole/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.6.0.0")] -[assembly: AssemblyFileVersion("0.6.0.0")] +[assembly: AssemblyVersion("0.7.0.0")] +[assembly: AssemblyFileVersion("0.7.0.0")]