Skip to content

Commit

Permalink
TelescopeControl: Attempt to fix protocol mismatches for LX200. Tenta…
Browse files Browse the repository at this point in the history
…tive fix for #818.
  • Loading branch information
gzotti committed Oct 24, 2019
1 parent fc47c20 commit 7394b96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions plugins/TelescopeControl/src/Lx200/Lx200Command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ bool Lx200CommandSetSelectedRa::writeCommandToBuffer(char *&p, char *end)
*p++ = ':';
*p++ = 'S';
*p++ = 'r';
*p++ = ' ';
// *p++ = ' '; // GZ seems this space is wrong?
int x = ra;
p += 8;
p[-1] = '0' + (x % 10); x /= 10;
Expand Down Expand Up @@ -157,7 +157,7 @@ bool Lx200CommandSetSelectedDec::writeCommandToBuffer(char *&p, char *end)
*p++ = ':';
*p++ = 'S';
*p++ = 'd';
*p++ = ' ';
// *p++ = ' '; // GZ seems this space is wrong?
int x = dec;
if (x < 0)
{
Expand All @@ -174,7 +174,7 @@ bool Lx200CommandSetSelectedDec::writeCommandToBuffer(char *&p, char *end)
p[-3] = ':';
p[-4] = '0' + (x % 10); x /= 10;
p[-5] = '0' + (x % 6); x /= 6;
p[-6] = '\xDF'; // = 223, degree symbol
p[-6] = '*'; // '\xDF'; // = 223, degree symbol. GZ: Should be asterisk, according to specs.
p[-7] = '0' + (x % 10); x /= 10;
p[-8] = '0' + static_cast<char>(x);
*p++ = '#';
Expand Down Expand Up @@ -492,11 +492,11 @@ int Lx200CommandGetDec::readAnswerFromBuffer(const char *&buff,

dec = ((*p++) - '0');
dec *= 10; dec += ((*p++) - '0');
if (*p++ != (static_cast<char>(223)))
if (*p++ != ('*'))
{
*log_file << Now()
<< "Lx200CommandGetDec::readAnswerFromBuffer: "
"error: degree sign expected"
"error: degree sign (*) expected"
<< endl;
}

Expand Down
4 changes: 2 additions & 2 deletions plugins/TelescopeControl/src/Lx200/Lx200Command.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class Lx200CommandStopSlew : public Lx200Command
void print(QTextStream &o) const;
};

//! Meade LX200 command: Set right ascension.
//! Meade LX200 command: Set right ascension. LONG FORMAT ONLY!
class Lx200CommandSetSelectedRa : public Lx200Command
{
public:
Expand All @@ -100,7 +100,7 @@ class Lx200CommandSetSelectedRa : public Lx200Command
const int ra;
};

//! Meade LX200 command: Set declination.
//! Meade LX200 command: Set declination. LONG FORMAT ONLY!
class Lx200CommandSetSelectedDec : public Lx200Command
{
public:
Expand Down

0 comments on commit 7394b96

Please sign in to comment.