From fed8b1a24b35c00d7ccf0424b942c410d24c245c Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 8 May 2019 17:45:42 +0100 Subject: [PATCH] Fixed issue with Target RA and Dec loosing precision --- .../Controller/TelescopeController.cs | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/MeadeAutostar497/Controller/TelescopeController.cs b/MeadeAutostar497/Controller/TelescopeController.cs index 89a4828..db3916d 100644 --- a/MeadeAutostar497/Controller/TelescopeController.cs +++ b/MeadeAutostar497/Controller/TelescopeController.cs @@ -395,13 +395,14 @@ namespace ASCOM.MeadeAutostar497.Controller if (_targetRightAscension == INVALID_PARAMETER) throw new ASCOM.InvalidOperationException("Target not set"); - var result = SerialPort.CommandTerminated(":Gr#", "#"); - //:Gr# Get current/target object RA - //Returns: HH: MM.T# or HH:MM:SS - //Depending upon which precision is set for the telescope + //var result = SerialPort.CommandTerminated(":Gr#", "#"); + ////:Gr# Get current/target object RA + ////Returns: HH: MM.T# or HH:MM:SS + ////Depending upon which precision is set for the telescope - double targetRa = HmsToDouble(result); - return targetRa; + //double targetRa = HmsToDouble(result); + //return targetRa; + return _targetRightAscension; } set { @@ -437,15 +438,15 @@ namespace ASCOM.MeadeAutostar497.Controller if (_targetDeclination == INVALID_PARAMETER) throw new ASCOM.InvalidOperationException("Target not set"); - var result = SerialPort.CommandTerminated(":Gd#", "#"); - //:Gd# Get Currently Selected Object/Target Declination - //Returns: sDD* MM# or sDD*MM’SS# - //Depending upon the current precision setting for the telescope. + //var result = SerialPort.CommandTerminated(":Gd#", "#"); + ////:Gd# Get Currently Selected Object/Target Declination + ////Returns: sDD* MM# or sDD*MM’SS# + ////Depending upon the current precision setting for the telescope. - double targetDec = DmsToDouble(result); - - return targetDec; + //double targetDec = DmsToDouble(result); + //return targetDec; + return _targetDeclination; } set {