Made sure that CommandString, CommandBool and CommandBlind work as expected, complete with Raw and non raw support. (Implementation is the same as one of the LX200 drivers.)
This commit is contained in:
@@ -189,68 +189,68 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
//Read the screen
|
||||
case "readdisplay":
|
||||
var output = SharedResourcesWrapper.SendString(":ED#");
|
||||
var output = SharedResourcesWrapper.SendString("ED");
|
||||
return output;
|
||||
|
||||
//top row of buttons
|
||||
case "enter":
|
||||
SharedResourcesWrapper.SendBlind(":EK13#");
|
||||
SharedResourcesWrapper.SendBlind("EK13");
|
||||
break;
|
||||
case "mode":
|
||||
SharedResourcesWrapper.SendBlind(":EK9#");
|
||||
SharedResourcesWrapper.SendBlind("EK9");
|
||||
break;
|
||||
case "longmode":
|
||||
SharedResourcesWrapper.SendBlind(":EK11#");
|
||||
SharedResourcesWrapper.SendBlind("EK11");
|
||||
break;
|
||||
case "goto":
|
||||
SharedResourcesWrapper.SendBlind(":EK24#");
|
||||
SharedResourcesWrapper.SendBlind("EK24");
|
||||
break;
|
||||
|
||||
case "0": //light and 0
|
||||
SharedResourcesWrapper.SendBlind(":EK48#");
|
||||
SharedResourcesWrapper.SendBlind("EK48");
|
||||
break;
|
||||
case "1":
|
||||
SharedResourcesWrapper.SendBlind(":EK49#");
|
||||
SharedResourcesWrapper.SendBlind("EK49");
|
||||
break;
|
||||
case "2":
|
||||
SharedResourcesWrapper.SendBlind(":EK50#");
|
||||
SharedResourcesWrapper.SendBlind("EK50");
|
||||
break;
|
||||
case "3":
|
||||
SharedResourcesWrapper.SendBlind(":EK51#");
|
||||
SharedResourcesWrapper.SendBlind("EK51");
|
||||
break;
|
||||
case "4":
|
||||
SharedResourcesWrapper.SendBlind(":EK52#");
|
||||
SharedResourcesWrapper.SendBlind("EK52");
|
||||
break;
|
||||
case "5":
|
||||
SharedResourcesWrapper.SendBlind(":EK53#");
|
||||
SharedResourcesWrapper.SendBlind("EK53");
|
||||
break;
|
||||
case "6":
|
||||
SharedResourcesWrapper.SendBlind(":EK54#");
|
||||
SharedResourcesWrapper.SendBlind("EK54");
|
||||
break;
|
||||
case "7":
|
||||
SharedResourcesWrapper.SendBlind(":EK55#");
|
||||
SharedResourcesWrapper.SendBlind("EK55");
|
||||
break;
|
||||
case "8":
|
||||
SharedResourcesWrapper.SendBlind(":EK56#");
|
||||
SharedResourcesWrapper.SendBlind("EK56");
|
||||
break;
|
||||
case "9":
|
||||
SharedResourcesWrapper.SendBlind(":EK57#");
|
||||
SharedResourcesWrapper.SendBlind("EK57");
|
||||
break;
|
||||
|
||||
case "up":
|
||||
SharedResourcesWrapper.SendBlind(":EK94#");
|
||||
SharedResourcesWrapper.SendBlind("EK94");
|
||||
break;
|
||||
case "down":
|
||||
SharedResourcesWrapper.SendBlind(":EK118#");
|
||||
SharedResourcesWrapper.SendBlind("EK118");
|
||||
break;
|
||||
case "back":
|
||||
SharedResourcesWrapper.SendBlind(":EK87#");
|
||||
SharedResourcesWrapper.SendBlind("EK87");
|
||||
break;
|
||||
case "forward":
|
||||
SharedResourcesWrapper.SendBlind(":EK69#");
|
||||
SharedResourcesWrapper.SendBlind("EK69");
|
||||
break;
|
||||
case "?":
|
||||
SharedResourcesWrapper.SendBlind(":EK63#");
|
||||
SharedResourcesWrapper.SendBlind("EK63");
|
||||
break;
|
||||
default:
|
||||
LogMessage("", "Action {0}, parameters {1} not implemented", actionName, actionParameters);
|
||||
@@ -335,7 +335,7 @@ namespace ASCOM.Meade.net
|
||||
CheckConnected("CommandBlind");
|
||||
// Call CommandString and return as soon as it finishes
|
||||
//this.CommandString(command, raw);
|
||||
SharedResourcesWrapper.SendBlind(command);
|
||||
SharedResourcesWrapper.SendBlind(command, raw);
|
||||
// or
|
||||
//throw new ASCOM.MethodNotImplementedException("CommandBlind");
|
||||
// DO NOT have both these sections! One or the other
|
||||
@@ -345,9 +345,10 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
CheckConnected("CommandBool");
|
||||
//string ret = CommandString(command, raw);
|
||||
return SharedResourcesWrapper.SendBool(command, raw);
|
||||
// TODO decode the return string and return true or false
|
||||
// or
|
||||
throw new MethodNotImplementedException("CommandBool");
|
||||
//throw new MethodNotImplementedException("CommandBool");
|
||||
// DO NOT have both these sections! One or the other
|
||||
}
|
||||
|
||||
@@ -675,7 +676,7 @@ namespace ASCOM.Meade.net
|
||||
|
||||
SharedResourcesWrapper.Lock(() =>
|
||||
{
|
||||
var result = SharedResourcesWrapper.SendString(":GZ#");
|
||||
var result = SharedResourcesWrapper.SendString("GZ");
|
||||
LogMessage("SetLongFormat", $"Get - Azimuth {result}");
|
||||
//:GZ# Get telescope azimuth
|
||||
//Returns: DDD*MM.T or DDD*MM’SS#
|
||||
@@ -686,12 +687,12 @@ namespace ASCOM.Meade.net
|
||||
if (IsLongFormat != setLongFormat)
|
||||
{
|
||||
_utilities.WaitForMilliseconds(500);
|
||||
SharedResourcesWrapper.SendBlind(":U#");
|
||||
SharedResourcesWrapper.SendBlind("U");
|
||||
//:U# Toggle between low/hi precision positions
|
||||
//Low - RA displays and messages HH:MM.T sDD*MM
|
||||
//High - Dec / Az / El displays and messages HH:MM: SS sDD*MM:SS
|
||||
// Returns Nothing
|
||||
result = SharedResourcesWrapper.SendString(":GZ#");
|
||||
result = SharedResourcesWrapper.SendString("GZ");
|
||||
IsLongFormat = result.Length > 6;
|
||||
LogMessage("SetLongFormat", $"Get - Azimuth {result}");
|
||||
if (IsLongFormat == setLongFormat)
|
||||
@@ -709,7 +710,7 @@ namespace ASCOM.Meade.net
|
||||
private bool TogglePrecision()
|
||||
{
|
||||
LogMessage("TogglePrecision", "Toggling slewing precision");
|
||||
var result = SharedResourcesWrapper.SendChar(":P#");
|
||||
var result = SharedResourcesWrapper.SendChar("P");
|
||||
//:P# Toggles High Precsion Pointing. When High precision pointing is enabled scope will first allow the operator to center a nearby bright star before moving to the actual target.
|
||||
//Returns: <string>
|
||||
//“HIGH PRECISION” Current setting after this command.
|
||||
@@ -729,9 +730,6 @@ namespace ASCOM.Meade.net
|
||||
|
||||
SharedResourcesWrapper.ReadCharacters(throwAwayCharacters);
|
||||
|
||||
//Make sure that the buffers are cleared out.
|
||||
SharedResourcesWrapper.SendBlind("#");
|
||||
|
||||
return highPrecision;
|
||||
}
|
||||
|
||||
@@ -749,7 +747,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
CheckConnectedAndValidateSite(site, "SelectSite");
|
||||
|
||||
SharedResourcesWrapper.SendBlind($":W{site}#");
|
||||
SharedResourcesWrapper.SendBlind($"W{site}");
|
||||
//:W<n>#
|
||||
//Set current site to<n>, an ASCII digit in the range 1..4
|
||||
//Returns: Nothing
|
||||
@@ -775,7 +773,7 @@ namespace ASCOM.Meade.net
|
||||
switch (site)
|
||||
{
|
||||
case 1:
|
||||
command = $":SM{sitename}#";
|
||||
command = $"SM{sitename}";
|
||||
//:SM<string>#
|
||||
//Set site 1’s name to be<string>.LX200s only accept 3 character strings. Other scopes accept up to 15 characters.
|
||||
// Returns:
|
||||
@@ -783,7 +781,7 @@ namespace ASCOM.Meade.net
|
||||
//1 - Valid
|
||||
break;
|
||||
case 2:
|
||||
command = $":SN{sitename}#";
|
||||
command = $"SN{sitename}";
|
||||
//:SN<string>#
|
||||
//Set site 2’s name to be<string>.LX200s only accept 3 character strings. Other scopes accept up to 15 characters.
|
||||
// Returns:
|
||||
@@ -791,7 +789,7 @@ namespace ASCOM.Meade.net
|
||||
//1 - Valid
|
||||
break;
|
||||
case 3:
|
||||
command = $":SO{sitename}#";
|
||||
command = $"SO{sitename}";
|
||||
//:SO<string>#
|
||||
//Set site 3’s name to be<string>.LX200s only accept 3 character strings. Other scopes accept up to 15 characters.
|
||||
// Returns:
|
||||
@@ -799,7 +797,7 @@ namespace ASCOM.Meade.net
|
||||
//1 - Valid
|
||||
break;
|
||||
case 4:
|
||||
command = $":SP{sitename}#";
|
||||
command = $"SP{sitename}";
|
||||
//:SP<string>#
|
||||
//Set site 4’s name to be<string>.LX200s only accept 3 character strings. Other scopes accept up to 15 characters.
|
||||
// Returns:
|
||||
@@ -824,22 +822,22 @@ namespace ASCOM.Meade.net
|
||||
switch (site)
|
||||
{
|
||||
case 1:
|
||||
return SharedResourcesWrapper.SendString(":GM#");
|
||||
return SharedResourcesWrapper.SendString("GM");
|
||||
//:GM# Get Site 1 Name
|
||||
//Returns: <string>#
|
||||
//A ‘#’ terminated string with the name of the requested site.
|
||||
case 2:
|
||||
return SharedResourcesWrapper.SendString(":GN#");
|
||||
return SharedResourcesWrapper.SendString("GN");
|
||||
//:GN# Get Site 2 Name
|
||||
//Returns: <string>#
|
||||
//A ‘#’ terminated string with the name of the requested site.
|
||||
case 3:
|
||||
return SharedResourcesWrapper.SendString(":GO#");
|
||||
return SharedResourcesWrapper.SendString("GO");
|
||||
//:GO# Get Site 3 Name
|
||||
//Returns: <string>#
|
||||
//A ‘#’ terminated string with the name of the requested site.
|
||||
case 4:
|
||||
return SharedResourcesWrapper.SendString(":GP#");
|
||||
return SharedResourcesWrapper.SendString("GP");
|
||||
//:GP# Get Site 4 Name
|
||||
//Returns: <string>#
|
||||
//A ‘#’ terminated string with the name of the requested site.
|
||||
@@ -864,11 +862,11 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
//string name = "Short driver name - please customise";
|
||||
|
||||
//var telescopeProduceName = _sharedResourcesWrapper.SendString(":GVP#");
|
||||
//var telescopeProduceName = _sharedResourcesWrapper.SendString("GVP");
|
||||
////:GVP# Get Telescope Product Name
|
||||
////Returns: <string>#
|
||||
|
||||
//var firmwareVersion = _sharedResourcesWrapper.SendString(":GVN#");
|
||||
//var firmwareVersion = _sharedResourcesWrapper.SendString("GVN");
|
||||
////:GVN# Get Telescope Firmware Number
|
||||
////Returns: dd.d#
|
||||
|
||||
@@ -889,7 +887,7 @@ namespace ASCOM.Meade.net
|
||||
CheckParked();
|
||||
|
||||
LogMessage("AbortSlew", "Aborting slew");
|
||||
SharedResourcesWrapper.SendBlind(":Q#");
|
||||
SharedResourcesWrapper.SendBlind("Q");
|
||||
//:Q# Halt all current slewing
|
||||
//Returns:Nothing
|
||||
|
||||
@@ -914,7 +912,7 @@ namespace ASCOM.Meade.net
|
||||
|
||||
const char ack = (char) 6;
|
||||
|
||||
var alignmentString = SharedResourcesWrapper.SendChar(ack.ToString());
|
||||
var alignmentString = SharedResourcesWrapper.SendChar(ack.ToString(), true);
|
||||
//ACK <0x06> Query of alignment mounting mode.
|
||||
//Returns:
|
||||
//A If scope in AltAz Mode
|
||||
@@ -965,13 +963,13 @@ namespace ASCOM.Meade.net
|
||||
switch (value)
|
||||
{
|
||||
case AlignmentModes.algAltAz:
|
||||
SharedResourcesWrapper.SendBlind(":AA#");
|
||||
SharedResourcesWrapper.SendBlind("AA");
|
||||
//:AA# Sets telescope the AltAz alignment mode
|
||||
//Returns: nothing
|
||||
break;
|
||||
case AlignmentModes.algPolar:
|
||||
case AlignmentModes.algGermanPolar:
|
||||
SharedResourcesWrapper.SendBlind(":AP#");
|
||||
SharedResourcesWrapper.SendBlind("AP");
|
||||
//:AP# Sets telescope to Polar alignment mode
|
||||
//Returns: nothing
|
||||
break;
|
||||
@@ -995,7 +993,7 @@ namespace ASCOM.Meade.net
|
||||
return altAz.Altitude;
|
||||
|
||||
//firmware bug in 44Eg, :GA# is returning the dec, not the altitude!
|
||||
//var result = _sharedResourcesWrapper.SendString(":GA#");
|
||||
//var result = _sharedResourcesWrapper.SendString("GA");
|
||||
////:GA# Get Telescope Altitude
|
||||
////Returns: sDD* MM# or sDD*MM’SS#
|
||||
////The current scope altitude. The returned format depending on the current precision setting.
|
||||
@@ -1085,7 +1083,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
CheckConnected("Azimuth Get");
|
||||
|
||||
//var result = _sharedResourcesWrapper.SendString(":GZ#");
|
||||
//var result = _sharedResourcesWrapper.SendString("GZ");
|
||||
//:GZ# Get telescope azimuth
|
||||
//Returns: DDD*MM#T or DDD*MM’SS#
|
||||
//The current telescope Azimuth depending on the selected precision.
|
||||
@@ -1275,7 +1273,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
CheckParked();
|
||||
|
||||
var result = SharedResourcesWrapper.SendString(":GD#");
|
||||
var result = SharedResourcesWrapper.SendString("GD");
|
||||
//:GD# Get Telescope Declination.
|
||||
//Returns: sDD*MM# or sDD*MM’SS#
|
||||
//Depending upon the current precision setting for the telescope.
|
||||
@@ -1378,7 +1376,7 @@ namespace ASCOM.Meade.net
|
||||
}
|
||||
|
||||
LogMessage($"{propertyName} Set", $"Setting new guiderate {value.ToString(CultureInfo.CurrentCulture)} arc seconds/second ({value.ToString(CultureInfo.CurrentCulture)} degrees/second)");
|
||||
SharedResourcesWrapper.SendBlind($":Rg{value:00.0}#");
|
||||
SharedResourcesWrapper.SendBlind($"Rg{value:00.0}");
|
||||
//:RgSS.S#
|
||||
//Set guide rate to +/ -SS.S to arc seconds per second.This rate is added to or subtracted from the current tracking
|
||||
//Rates when the CCD guider or handbox guider buttons are pressed when the guide rate is selected.Rate shall not exceed
|
||||
@@ -1460,22 +1458,22 @@ namespace ASCOM.Meade.net
|
||||
//do nothing, it's ok this time as we're halting the slew.
|
||||
break;
|
||||
case 1:
|
||||
SharedResourcesWrapper.SendBlind(":RG#");
|
||||
SharedResourcesWrapper.SendBlind("RG");
|
||||
//:RG# Set Slew rate to Guiding Rate (slowest)
|
||||
//Returns: Nothing
|
||||
break;
|
||||
case 2:
|
||||
SharedResourcesWrapper.SendBlind(":RC#");
|
||||
SharedResourcesWrapper.SendBlind("RC");
|
||||
//:RC# Set Slew rate to Centering rate (2nd slowest)
|
||||
//Returns: Nothing
|
||||
break;
|
||||
case 3:
|
||||
SharedResourcesWrapper.SendBlind(":RM#");
|
||||
SharedResourcesWrapper.SendBlind("RM");
|
||||
//:RM# Set Slew rate to Find Rate (2nd Fastest)
|
||||
//Returns: Nothing
|
||||
break;
|
||||
case 4:
|
||||
SharedResourcesWrapper.SendBlind(":RS#");
|
||||
SharedResourcesWrapper.SendBlind("RS");
|
||||
//:RS# Set Slew rate to max (fastest)
|
||||
//Returns: Nothing
|
||||
break;
|
||||
@@ -1495,21 +1493,21 @@ namespace ASCOM.Meade.net
|
||||
}
|
||||
|
||||
_movingPrimary = false;
|
||||
SharedResourcesWrapper.SendBlind(":Qe#");
|
||||
SharedResourcesWrapper.SendBlind("Qe");
|
||||
//:Qe# Halt eastward Slews
|
||||
//Returns: Nothing
|
||||
SharedResourcesWrapper.SendBlind(":Qw#");
|
||||
SharedResourcesWrapper.SendBlind("Qw");
|
||||
//:Qw# Halt westward Slews
|
||||
//Returns: Nothing
|
||||
break;
|
||||
case ComparisonResult.Greater:
|
||||
SharedResourcesWrapper.SendBlind(":Me#");
|
||||
SharedResourcesWrapper.SendBlind("Me");
|
||||
//:Me# Move Telescope East at current slew rate
|
||||
//Returns: Nothing
|
||||
_movingPrimary = true;
|
||||
break;
|
||||
case ComparisonResult.Lower:
|
||||
SharedResourcesWrapper.SendBlind(":Mw#");
|
||||
SharedResourcesWrapper.SendBlind("Mw");
|
||||
//:Mw# Move Telescope West at current slew rate
|
||||
//Returns: Nothing
|
||||
_movingPrimary = true;
|
||||
@@ -1525,21 +1523,21 @@ namespace ASCOM.Meade.net
|
||||
SetSlewingMinEndTime();
|
||||
}
|
||||
_movingSecondary = false;
|
||||
SharedResourcesWrapper.SendBlind(":Qn#");
|
||||
SharedResourcesWrapper.SendBlind("Qn");
|
||||
//:Qn# Halt northward Slews
|
||||
//Returns: Nothing
|
||||
SharedResourcesWrapper.SendBlind(":Qs#");
|
||||
SharedResourcesWrapper.SendBlind("Qs");
|
||||
//:Qs# Halt southward Slews
|
||||
//Returns: Nothing
|
||||
break;
|
||||
case ComparisonResult.Greater:
|
||||
SharedResourcesWrapper.SendBlind(":Mn#");
|
||||
SharedResourcesWrapper.SendBlind("Mn");
|
||||
//:Mn# Move Telescope North at current slew rate
|
||||
//Returns: Nothing
|
||||
_movingSecondary = true;
|
||||
break;
|
||||
case ComparisonResult.Lower:
|
||||
SharedResourcesWrapper.SendBlind(":Ms#");
|
||||
SharedResourcesWrapper.SendBlind("Ms");
|
||||
//:Ms# Move Telescope South at current slew rate
|
||||
//Returns: Nothing
|
||||
_movingSecondary = true;
|
||||
@@ -1561,7 +1559,7 @@ namespace ASCOM.Meade.net
|
||||
|
||||
//Setting park to true before sending the park command as the Autostar and Audiostar stop serial communications once the park command has been issued.
|
||||
AtPark = true;
|
||||
SharedResourcesWrapper.SendBlind(":hP#");
|
||||
SharedResourcesWrapper.SendBlind("hP");
|
||||
//:hP# Autostar, Autostar II and LX 16”Slew to Park Position
|
||||
//Returns: Nothing
|
||||
}
|
||||
@@ -1611,7 +1609,7 @@ namespace ASCOM.Meade.net
|
||||
}
|
||||
|
||||
LogMessage("PulseGuide", "Using new pulse guiding technique");
|
||||
SharedResourcesWrapper.SendBlind($":Mg{d}{duration:0000}#");
|
||||
SharedResourcesWrapper.SendBlind($"Mg{d}{duration:0000}");
|
||||
//:MgnDDDD#
|
||||
//:MgsDDDD#
|
||||
//:MgeDDDD#
|
||||
@@ -1696,7 +1694,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
CheckParked();
|
||||
|
||||
var result = SharedResourcesWrapper.SendString(":GR#");
|
||||
var result = SharedResourcesWrapper.SendString("GR");
|
||||
//:GR# Get Telescope RA
|
||||
//Returns: HH:MM.T# or HH:MM:SS#
|
||||
//Depending which precision is set for the telescope
|
||||
@@ -1824,7 +1822,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
CheckParked();
|
||||
|
||||
var latitude = SharedResourcesWrapper.SendString(":Gt#");
|
||||
var latitude = SharedResourcesWrapper.SendString("Gt");
|
||||
//:Gt# Get Current Site Latitude
|
||||
//Returns: sDD* MM#
|
||||
//The latitude of the current site. Positive inplies North latitude.
|
||||
@@ -1865,7 +1863,7 @@ namespace ASCOM.Meade.net
|
||||
var absValue = Math.Abs(value);
|
||||
int d = Convert.ToInt32(Math.Floor(absValue));
|
||||
int m = Convert.ToInt32(60 * (absValue - d));
|
||||
var commandString = $":St{sign}{d:00}*{m:00}#";
|
||||
var commandString = $"St{sign}{d:00}*{m:00}";
|
||||
|
||||
var result = SharedResourcesWrapper.SendChar(commandString);
|
||||
//:StsDD*MM#
|
||||
@@ -1891,7 +1889,7 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
CheckParked();
|
||||
|
||||
var longitude = SharedResourcesWrapper.SendString(":Gg#");
|
||||
var longitude = SharedResourcesWrapper.SendString("Gg");
|
||||
//:Gg# Get Current Site Longitude
|
||||
//Returns: sDDD*MM#
|
||||
//The current site Longitude. East Longitudes are expressed as negative
|
||||
@@ -1934,7 +1932,7 @@ namespace ASCOM.Meade.net
|
||||
int d = Convert.ToInt32(Math.Floor(newLongitude));
|
||||
int m = Convert.ToInt32(60 * (newLongitude - d));
|
||||
|
||||
var commandstring = $":Sg{d:000}*{m:00}#";
|
||||
var commandstring = $"Sg{d:000}*{m:00}";
|
||||
|
||||
var result = SharedResourcesWrapper.SendChar(commandstring);
|
||||
//:SgDDD*MM#
|
||||
@@ -2030,7 +2028,7 @@ namespace ASCOM.Meade.net
|
||||
switch (polar)
|
||||
{
|
||||
case true:
|
||||
var response = SharedResourcesWrapper.SendChar(":MS#");
|
||||
var response = SharedResourcesWrapper.SendChar("MS");
|
||||
//:MS# Slew to Target Object
|
||||
//Returns:
|
||||
//0 Slew is Possible
|
||||
@@ -2067,7 +2065,7 @@ namespace ASCOM.Meade.net
|
||||
|
||||
break;
|
||||
case false:
|
||||
var maResponse = SharedResourcesWrapper.SendChar(":MA#");
|
||||
var maResponse = SharedResourcesWrapper.SendChar("MA");
|
||||
//:MA# Autostar, LX 16”, Autostar II – Slew to target Alt and Az
|
||||
//Returns:
|
||||
//0 - No fault
|
||||
@@ -2204,7 +2202,7 @@ namespace ASCOM.Meade.net
|
||||
string result;
|
||||
try
|
||||
{
|
||||
result = SharedResourcesWrapper.SendString(":D#");
|
||||
result = SharedResourcesWrapper.SendString("D");
|
||||
}
|
||||
catch (TimeoutException)
|
||||
{
|
||||
@@ -2289,7 +2287,7 @@ namespace ASCOM.Meade.net
|
||||
CheckConnected("SyncToTarget");
|
||||
CheckParked();
|
||||
|
||||
var result = SharedResourcesWrapper.SendString(":CM#");
|
||||
var result = SharedResourcesWrapper.SendString("CM");
|
||||
//:CM# Synchronizes the telescope's position with the currently selected database object's coordinates.
|
||||
//Returns:
|
||||
//LX200's - a "#" terminated string with the name of the object that was synced.
|
||||
@@ -2355,7 +2353,7 @@ namespace ASCOM.Meade.net
|
||||
|
||||
var s = value < 0 ? string.Empty : "+";
|
||||
|
||||
var command = $":Sd{s}{dms}#";
|
||||
var command = $"Sd{s}{dms}";
|
||||
|
||||
LogMessage("TargetDeclination Set", $"{command}");
|
||||
var result = SharedResourcesWrapper.SendChar(command);
|
||||
@@ -2409,7 +2407,7 @@ namespace ASCOM.Meade.net
|
||||
_utilities.HoursToHMS(value, ":", ":", ":", _digitsRa) :
|
||||
_utilities.HoursToHM(value, ":", "", _digitsRa).Replace(',','.');
|
||||
|
||||
var command = $":Sr{hms}#";
|
||||
var command = $"Sr{hms}";
|
||||
LogMessage("TargetRightAscension Set", $"{command}");
|
||||
var response = SharedResourcesWrapper.SendChar(command);
|
||||
//:SrHH:MM.T#
|
||||
@@ -2471,12 +2469,12 @@ namespace ASCOM.Meade.net
|
||||
switch (value)
|
||||
{
|
||||
case DriveRates.driveSidereal:
|
||||
SharedResourcesWrapper.SendBlind(":TQ#");
|
||||
SharedResourcesWrapper.SendBlind("TQ");
|
||||
//:TQ# Selects sidereal tracking rate
|
||||
//Returns: Nothing
|
||||
break;
|
||||
case DriveRates.driveLunar:
|
||||
SharedResourcesWrapper.SendBlind(":TL#");
|
||||
SharedResourcesWrapper.SendBlind("TL");
|
||||
//:TL# Set Lunar Tracking Rage
|
||||
//Returns: Nothing
|
||||
break;
|
||||
@@ -2513,7 +2511,7 @@ namespace ASCOM.Meade.net
|
||||
|
||||
private TimeSpan GetUtcCorrection()
|
||||
{
|
||||
string utcOffSet = SharedResourcesWrapper.SendString(":GG#");
|
||||
string utcOffSet = SharedResourcesWrapper.SendString("GG");
|
||||
//:GG# Get UTC offset time
|
||||
//Returns: sHH# or sHH.H#
|
||||
//The number of decimal hours to add to local time to convert it to UTC. If the number is a whole number the
|
||||
@@ -2544,11 +2542,11 @@ namespace ASCOM.Meade.net
|
||||
{
|
||||
var tdd = new TelescopeDateDetails
|
||||
{
|
||||
TelescopeDate = SharedResourcesWrapper.SendString(":GC#"),
|
||||
TelescopeDate = SharedResourcesWrapper.SendString("GC"),
|
||||
//:GC# Get current date.
|
||||
//Returns: MM/DD/YY#
|
||||
//The current local calendar date for the telescope.
|
||||
TelescopeTime = SharedResourcesWrapper.SendString(":GL#"),
|
||||
TelescopeTime = SharedResourcesWrapper.SendString("GL"),
|
||||
//:GL# Get Local Time in 24 hour format
|
||||
//Returns: HH:MM:SS#
|
||||
//The Local Time in 24 - hour Format
|
||||
@@ -2597,7 +2595,7 @@ namespace ASCOM.Meade.net
|
||||
var utcCorrection = GetUtcCorrection();
|
||||
var localDateTime = value - utcCorrection;
|
||||
|
||||
string localStingCommand = $":SL{localDateTime:HH:mm:ss}#";
|
||||
string localStingCommand = $"SL{localDateTime:HH:mm:ss}";
|
||||
var timeResult = SharedResourcesWrapper.SendChar(localStingCommand);
|
||||
//:SLHH:MM:SS#
|
||||
//Set the local Time
|
||||
@@ -2609,7 +2607,7 @@ namespace ASCOM.Meade.net
|
||||
throw new InvalidOperationException("Failed to set local time");
|
||||
}
|
||||
|
||||
string localDateCommand = $":SC{localDateTime:MM/dd/yy}#";
|
||||
string localDateCommand = $"SC{localDateTime:MM/dd/yy}";
|
||||
var dateResult = SharedResourcesWrapper.SendChar(localDateCommand);
|
||||
//:SCMM/DD/YY#
|
||||
//Change Handbox Date to MM/DD/YY
|
||||
@@ -2640,7 +2638,7 @@ namespace ASCOM.Meade.net
|
||||
if (!AtPark)
|
||||
return;
|
||||
|
||||
SharedResourcesWrapper.SendChar(":I#");
|
||||
SharedResourcesWrapper.SendChar("I");
|
||||
//:I# LX200 GPS Only - Causes the telescope to cease current operations and restart at its power on initialization.
|
||||
//Returns: X once the handset restart has completed
|
||||
|
||||
@@ -2655,7 +2653,7 @@ namespace ASCOM.Meade.net
|
||||
var localDateTime = _clock.UtcNow - utcCorrection;
|
||||
|
||||
//localDateTime: HH: mm: ss
|
||||
var result = SharedResourcesWrapper.SendChar($":hI{localDateTime:yyMMddHHmmss}#");
|
||||
var result = SharedResourcesWrapper.SendChar($"hI{localDateTime:yyMMddHHmmss}");
|
||||
//:hIYYMMDDHHMMSS#
|
||||
//Bypass handbox entry of daylight savings, date and time.Use the values supplied in this command.This feature is
|
||||
//intended to allow use of the Autostar II from permanent installations where GPS reception is not possible, such as within
|
||||
|
||||
Reference in New Issue
Block a user