Skip to content

Commit 227c8d4

Browse files
V1.7.18 - Updates
- Accommodate INDI drivers weird interpretation of the LX200 protocol (allow : and * for DEC degrees) - Added :XGT# command to get current tracking speed.
1 parent 8d78c31 commit 227c8d4

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

Software/Arduino code/OpenAstroTracker/MeadeCommandProcessor.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,11 @@
284284
// Get the adjustment factor used to speed up (>1.0) or slow down (<1.0) the tracking speed of the mount.
285285
// Returns: float
286286
//
287+
// :XGT#
288+
// Get Tracking speed
289+
// Get the absolute tracking speed of the mount.
290+
// Returns: float
291+
//
287292
// :XGH#
288293
// Get HA
289294
// Get the current HA of the mount.
@@ -464,7 +469,7 @@ String MeadeCommandProcessor::handleMeadeSetInfo(String inCmd) {
464469
// 0123456789
465470
// :Sd+84*03:02
466471
int sgn = inCmd[1] == '+' ? 1 : -1;
467-
if ((inCmd[4] == '*') && (inCmd[7] == ':'))
472+
if (((inCmd[4] == '*') || (inCmd[4] == ':')) && (inCmd[7] == ':'))
468473
{
469474
int deg = sgn * inCmd.substring(2, 4).toInt();
470475
if (NORTHERN_HEMISPHERE) {
@@ -532,7 +537,7 @@ String MeadeCommandProcessor::handleMeadeSetInfo(String inCmd) {
532537
// 0123456789012345678
533538
// :SY+84*03:02.18:34:12
534539
int sgn = inCmd[1] == '+' ? 1 : -1;
535-
if ((inCmd[4] == '*') && (inCmd[7] == ':') && (inCmd[10] == '.') && (inCmd[13] == ':') && (inCmd[16] == ':')) {
540+
if (((inCmd[4] == '*') || (inCmd[4] == ':')) && (inCmd[7] == ':') && (inCmd[10] == '.') && (inCmd[13] == ':') && (inCmd[16] == ':')) {
536541
int deg = inCmd.substring(2, 4).toInt();
537542
_mount->syncPosition(inCmd.substring(11, 13).toInt(), inCmd.substring(14, 16).toInt(), inCmd.substring(17, 19).toInt(), sgn * deg + (NORTHERN_HEMISPHERE ? -90 : 90), inCmd.substring(5, 7).toInt(), inCmd.substring(8, 10).toInt());
538543
return "1";
@@ -542,7 +547,7 @@ String MeadeCommandProcessor::handleMeadeSetInfo(String inCmd) {
542547
else if ((inCmd[0] == 't')) // latitude: :St+30*29#
543548
{
544549
float sgn = inCmd[1] == '+' ? 1.0f : -1.0f;
545-
if (inCmd[4] == '*') {
550+
if ((inCmd[4] == '*') || (inCmd[4] == ':')) {
546551
int deg = inCmd.substring(2, 4).toInt();
547552
int minute = inCmd.substring(5, 7).toInt();
548553
_mount->setLatitude(sgn * (1.0f * deg + (minute / 60.0f)));
@@ -552,7 +557,7 @@ String MeadeCommandProcessor::handleMeadeSetInfo(String inCmd) {
552557
}
553558
else if (inCmd[0] == 'g') // longitude :Sg097*34#
554559
{
555-
if (inCmd[4] == '*') {
560+
if ((inCmd[4] == '*') || (inCmd[4] == ':')) {
556561
int deg = inCmd.substring(1, 4).toInt();
557562
int minute = inCmd.substring(5, 7).toInt();
558563
float lon = 1.0f * deg + (1.0f * minute / 60.0f);
@@ -696,6 +701,9 @@ String MeadeCommandProcessor::handleMeadeExtraCommands(String inCmd) {
696701
else if (inCmd[1] == 'S') {
697702
return String(_mount->getSpeedCalibration(), 5) + "#";
698703
}
704+
else if (inCmd[1] == 'T') {
705+
return String(_mount->getSpeed(TRACKING), 7) + "#";
706+
}
699707
else if (inCmd[1] == 'B') {
700708
return String(_mount->getBacklashCorrection()) + "#";
701709
}

Software/Arduino code/OpenAstroTracker/OpenAstroTracker.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include "Globals.hpp"
2020

21-
String version = "V1.7.17";
21+
String version = "V1.7.18";
2222

2323
///////////////////////////////////////////////////////////////////////////
2424
// Please see the Globals.h file for configuration of the firmware.

0 commit comments

Comments
 (0)