TelescopeClientDirectLx200.cpp   TelescopeClientDirectLx200.cpp 
skipping to change at line 80 skipping to change at line 80
{ {
qWarning() << "ERROR creating TelescopeClientDirectLx200: ti me_delay not valid (should be less than 10000000)"; qWarning() << "ERROR creating TelescopeClientDirectLx200: ti me_delay not valid (should be less than 10000000)";
return; return;
} }
//end_of_timeout = -0x8000000000000000LL; //end_of_timeout = -0x8000000000000000LL;
#ifdef Q_OS_WIN32 #ifdef Q_OS_WIN32
if(serialDeviceName.right(serialDeviceName.size() - 3).toInt() > 9) if(serialDeviceName.right(serialDeviceName.size() - 3).toInt() > 9)
serialDeviceName = "\\\\.\\" + serialDeviceName;//"\\.\COMxx ", not sure if it will work serialDeviceName = "\\\\.\\" + serialDeviceName;//"\\.\COMxx ", not sure if it will work
else
serialDeviceName = serialDeviceName;
#endif //Q_OS_WIN32 #endif //Q_OS_WIN32
//Try to establish a connection to the telescope //Try to establish a connection to the telescope
lx200 = new Lx200Connection(*this, qPrintable(serialDeviceName)); lx200 = new Lx200Connection(*this, qPrintable(serialDeviceName));
if (lx200->isClosed()) if (lx200->isClosed())
{ {
qWarning() << "ERROR creating TelescopeClientDirectLx200: ca nnot open serial device" << serialDeviceName; qWarning() << "ERROR creating TelescopeClientDirectLx200: ca nnot open serial device" << serialDeviceName;
return; return;
} }
skipping to change at line 121 skipping to change at line 119
const StelCore* core = StelApp::getInstance().getCore(); const StelCore* core = StelApp::getInstance().getCore();
position = core->j2000ToEquinoxEqu(j2000Pos); position = core->j2000ToEquinoxEqu(j2000Pos);
} }
//if (writeBufferEnd - writeBuffer + 20 < (int)sizeof(writeBuffer)) //if (writeBufferEnd - writeBuffer + 20 < (int)sizeof(writeBuffer))
//TODO: See the else clause, think how to do the same thing //TODO: See the else clause, think how to do the same thing
{ {
const double ra_signed = atan2(position[1], position[0]); const double ra_signed = atan2(position[1], position[0]);
//Workaround for the discrepancy in precision between Window s/Linux/PPC Macs and Intel Macs: //Workaround for the discrepancy in precision between Window s/Linux/PPC Macs and Intel Macs:
const double ra = (ra_signed >= 0) ? ra_signed : (ra_signed + 2.0 * M_PI); const double ra = (ra_signed >= 0) ? ra_signed : (ra_signed + 2.0 * M_PI);
const double dec = atan2(position[2], sqrt(position[0]*posit ion[0]+position[1]*position[1])); const double dec = atan2(position[2], std::sqrt(position[0]* position[0]+position[1]*position[1]));
unsigned int ra_int = (unsigned int)floor(0.5 + ra*(((unsign ed int)0x80000000)/M_PI)); unsigned int ra_int = (unsigned int)floor(0.5 + ra*(((unsign ed int)0x80000000)/M_PI));
int dec_int = (int)floor(0.5 + dec*(((unsigned int)0x8000000 0)/M_PI)); int dec_int = (int)floor(0.5 + dec*(((unsigned int)0x8000000 0)/M_PI));
gotoReceived(ra_int, dec_int); gotoReceived(ra_int, dec_int);
} }
/* /*
else else
{ {
qDebug() << "TelescopeTCP(" << name << ")::telescope Goto: "<< "communication is too slow, I will ignore this command"; qDebug() << "TelescopeTCP(" << name << ")::telescope Goto: "<< "communication is too slow, I will ignore this command";
} }
 End of changes. 2 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/