Lx200Command.cpp   Lx200Command.cpp 
skipping to change at line 82 skipping to change at line 82
o << "Lx200CommandStopSlew"; o << "Lx200CommandStopSlew";
} }
bool Lx200CommandSetSelectedRa::writeCommandToBuffer(char *&p, char *end) bool Lx200CommandSetSelectedRa::writeCommandToBuffer(char *&p, char *end)
{ {
if (end-p < 13) return false; if (end-p < 13) return false;
// set object ra: // set object ra:
*p++ = ':'; *p++ = ':';
*p++ = 'S'; *p++ = 'S';
*p++ = 'r'; *p++ = 'r';
*p++ = ' ';
int x = ra; int x = ra;
p += 8; p += 8;
p[-1] = '0' + (x % 10); x /= 10; p[-1] = '0' + (x % 10); x /= 10;
p[-2] = '0' + (x % 6); x /= 6; p[-2] = '0' + (x % 6); x /= 6;
p[-3] = ':'; p[-3] = ':';
p[-4] = '0' + (x % 10); x /= 10; p[-4] = '0' + (x % 10); x /= 10;
p[-5] = '0' + (x % 6); x /= 6; p[-5] = '0' + (x % 6); x /= 6;
p[-6] = ':'; p[-6] = ':';
p[-7] = '0' + (x % 10); x /= 10; p[-7] = '0' + (x % 10); x /= 10;
p[-8] = '0' + x; p[-8] = '0' + x;
skipping to change at line 157 skipping to change at line 156
bool Lx200CommandSetSelectedDec::writeCommandToBuffer(char *&p, char *end) bool Lx200CommandSetSelectedDec::writeCommandToBuffer(char *&p, char *end)
{ {
if (end-p < 13) if (end-p < 13)
return false; return false;
// set object dec: // set object dec:
*p++ = ':'; *p++ = ':';
*p++ = 'S'; *p++ = 'S';
*p++ = 'd'; *p++ = 'd';
*p++ = ' ';
int x = dec; int x = dec;
if (x < 0) if (x < 0)
{ {
*p++ = '-'; *p++ = '-';
x = -x; x = -x;
} }
else else
{ {
*p++ = '+'; *p++ = '+';
} }
p += 8; p += 8;
p[-1] = '0' + (x % 10); x /= 10; p[-1] = '0' + (x % 10); x /= 10;
p[-2] = '0' + (x % 6); x /= 6; p[-2] = '0' + (x % 6); x /= 6;
p[-3] = ':'; p[-3] = ':';
p[-4] = '0' + (x % 10); x /= 10; p[-4] = '0' + (x % 10); x /= 10;
p[-5] = '0' + (x % 6); x /= 6; p[-5] = '0' + (x % 6); x /= 6;
p[-6] = 223; // degree symbol p[-6] = '*';
p[-7] = '0' + (x % 10); x /= 10; p[-7] = '0' + (x % 10); x /= 10;
p[-8] = '0' + x; p[-8] = '0' + x;
*p++ = '#'; *p++ = '#';
has_been_written_to_buffer = true; has_been_written_to_buffer = true;
return true; return true;
} }
int Lx200CommandSetSelectedDec::readAnswerFromBuffer(const char *&buff, int Lx200CommandSetSelectedDec::readAnswerFromBuffer(const char *&buff,
const char *end) const char *end)
{ {
 End of changes. 3 change blocks. 
3 lines changed or deleted 1 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/