21 #ifndef _TELESCOPE_CONTROL_GLOBALS_
22 #define _TELESCOPE_CONTROL_GLOBALS_
25 #include <QStringList>
27 namespace TelescopeControlGlobals {
28 const int MIN_SLOT_NUMBER = 1;
29 const int SLOT_COUNT = 9;
30 const int SLOT_NUMBER_LIMIT = MIN_SLOT_NUMBER + SLOT_COUNT;
31 const int MAX_SLOT_NUMBER = SLOT_NUMBER_LIMIT - 1;
33 const int BASE_TCP_PORT = 10000;
34 #define DEFAULT_TCP_PORT_FOR_SLOT(X) (BASE_TCP_PORT + X)
35 const int DEFAULT_TCP_PORT = DEFAULT_TCP_PORT_FOR_SLOT(MIN_SLOT_NUMBER);
37 const int MAX_CIRCLE_COUNT = 10;
40 const QString TELESCOPE_SERVER_PATH = QString(
"/%1.exe");
41 const QString SERIAL_PORT_PREFIX = QString(
"COM");
43 const QString TELESCOPE_SERVER_PATH = QString(
"/%1");
44 const QString SERIAL_PORT_PREFIX = QString(
"/dev/");
47 const int DEFAULT_DELAY = 500000;
48 #define MICROSECONDS_FROM_SECONDS(X) (X * 1000000)
49 #define SECONDS_FROM_MICROSECONDS(X) ((double) X / 1000000)
71 const QStringList SERIAL_PORT_NAMES = QString(
"COM1 COM2 COM3 COM4").split(
' ', QString::SkipEmptyParts);
72 #elif defined(Q_OS_MAC)
73 const QStringList SERIAL_PORT_NAMES = QString(
"/dev/ ").split(
' ', QString::SkipEmptyParts);
75 const QStringList SERIAL_PORT_NAMES = QString(
"/dev/ttyS0 /dev/ttyS1 /dev/ttyS2 /dev/ttyS3 /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3").split(
' ', QString::SkipEmptyParts);
79 const QStringList EMBEDDED_TELESCOPE_SERVERS = QString(
"TelescopeServerDummy TelescopeServerLx200 TelescopeServerNexStar").split(
' ', QString::SkipEmptyParts);
82 #endif //_TELESCOPE_CONTROL_GLOBALS_