5This library is free software;
6you can redistribute it and / or
7modify it under the terms of the GNU Lesser General Public
8License as published by the Free Software Foundation;
10version 2.1 of the License, or (at your option) any later version.
12This library is distributed in the hope that it will be useful,
13 but WITHOUT
ANY WARRANTY;
14without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16Lesser General Public License
for more details.
18You should have received a copy of the GNU Lesser General Public
19License along with
this library;
20if not, write to the Free Software
21Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110 - 1301 USA
68 extern "C" const char *getprogname(
void);
71static const char *getProgName()
76 extern char *__progname;
86 std::unique_ptr<LX200Generic> telescope;
92 if (strstr(getProgName(),
"indi_lx200classic"))
94 IDLog(
"initializing from LX200 classic device...\n");
97 else if (strstr(getProgName(),
"indi_lx200_OnStep"))
99 IDLog(
"initializing from LX200 OnStep device...\n");
102 else if (strstr(getProgName(),
"indi_lx200_proxisky"))
104 IDLog(
"initializing from Proxisky UMi device...\n");
107 else if (strstr(getProgName(),
"indi_lx200gps"))
109 IDLog(
"initializing from LX200 GPS device...\n");
112 else if (strstr(getProgName(),
"indi_lx200_16"))
114 IDLog(
"Initializing from LX200 16 device...\n");
117 else if (strstr(getProgName(),
"indi_lx200autostar"))
119 IDLog(
"initializing from Autostar device...\n");
122 else if (strstr(getProgName(),
"indi_lx200ap_v2"))
124 IDLog(
"initializing from Astrophysics V2 device...\n");
127 else if (strstr(getProgName(),
"indi_lx200ap_legacy"))
129 IDLog(
"initializing from Astrophysics GTOCP2 device...\n");
132 else if (strstr(getProgName(),
"indi_lx200gemini"))
134 IDLog(
"initializing from Losmandy Gemini device...\n");
137 else if (strstr(getProgName(),
"indi_lx200zeq25"))
139 IDLog(
"initializing from ZEQ25 device...\n");
142 else if (strstr(getProgName(),
"indi_lx200gotonova"))
144 IDLog(
"initializing from GotoNova device...\n");
147 else if (strstr(getProgName(),
"indi_ioptronHC8406"))
149 IDLog(
"initializing from ioptron telescope Hand Controller HC8406 device...\n");
152 else if (strstr(getProgName(),
"indi_lx200pulsar2"))
154 IDLog(
"initializing from pulsar2 device...\n");
157 else if (strstr(getProgName(),
"indi_lx200ss2000pc"))
159 IDLog(
"initializing from skysensor2000pc device...\n");
162 else if (strstr(getProgName(),
"indi_lx200fs2"))
164 IDLog(
"initializing from Astro-Electronic FS-2...\n");
167 else if (strstr(getProgName(),
"indi_lx200_10micron"))
169 IDLog(
"initializing for 10Micron mount...\n");
172 else if (strstr(getProgName(),
"indi_eq500x"))
174 IDLog(
"initializing for EQ500X mount...\n");
175 telescope.reset(
new EQ500X());
177 else if (strstr(getProgName(),
"indi_lx200am5"))
179 IDLog(
"initializing for ZWO AM5 mount...\n");
182 else if (strstr(getProgName(),
"indi_lx200_OpenAstroTech"))
184 IDLog(
"initializing for OpenAstroTech mount...\n");
187 else if (strstr(getProgName(),
"indi_lx200_pegasus_nyx101"))
189 IDLog(
"initializing for Pegasus NYX-101 mount...\n");
192 else if (strstr(getProgName(),
"indi_lx200_esp32go"))
194 IDLog(
"initializing for ESP32go mount...\n");
197 else if (strstr(getProgName(),
"indi_touptek_sh20"))
199 IDLog(
"initializing for TOUPTEK SH20 mount...\n");
230 LOG_DEBUG(
"Initializing from Generic LX200 device...");
void setVersion(uint16_t vMajor, uint16_t vMinor)
Set driver version information to be defined in DRIVER_INFO property as vMajor.vMinor.
void SetTelescopeCapability(uint32_t cap, uint8_t slewRateCount)
SetTelescopeCapability sets the Telescope capabilities. All capabilities must be initialized.
@ TELESCOPE_HAS_TRACK_MODE
@ LX200_HAS_PULSE_GUIDING
@ LX200_HAS_ALIGNMENT_TYPE
@ LX200_HAS_TRACKING_FREQ
void setLX200Capability(uint32_t cap)
void IDLog(const char *fmt,...)
static Logger & getInstance()
Method to get a reference to the object (i.e., Singleton) It is a static method.
int addDebugLevel(const char *debugLevelName, const char *LoggingLevelName)
Adds a new debugging level to the driver.