Debian Codegraph @

drivers/telescope/lx200_OnStep.h

raw symbols SCIP
1 /*
2 LX200 OnStep
3 based on LX200 Classic azwing ([email protected])
4 Contributors:
5 James Lancaster https://github.com/james-lan
6 Ray Wells https://github.com/blueshawk
7 Jamie Flinn https://github.com/jamiecflinn
8
9 Copyright (C) 2003 Jasem Mutlaq ([email protected])-2021 (Contributors, above)
10
11 This library is free software; you can redistribute it and/or
12 modify it under the terms of the GNU Lesser General Public
13 License as published by the Free Software Foundation; either
14 version 2.1 of the License, or (at your option) any later version.
15
16 This library is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 Lesser General Public License for more details.
20
21 You should have received a copy of the GNU Lesser General Public
22 License along with this library; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24
25 ===========================================
26
27 Version not yet updated/No INDI release:
28 Version 1.17
29 - fixed setMaxElevationLimit / setMinElevationLimit
30 Version 1.16
31 - fixed uninitialized UTC structure thanks to Norikyu
32 Version 1.15
33 - Fixed setUTCOffset after change in lx200driver to comply with OnStep format :SG[sHH]#
34 Version 1.14
35 - Modified range for Minutes Pas Meridian East and West to -180 .. +180
36 - Modified debug messages Minutes Pas Meridian (Was B"acklash ...)
37
38 Version 1.13
39 - Timeouts and misc errors due to new behavior of SWS (SmartWebServer)
40 - - Timeouts still at 100ms for USB connections, if on a TCP/network connection timeout reverts to 2 sec.
41 - Improvements to Focuser and Rotator polling
42 - Focuser doesn't show up if not detected (Regression fixed)
43
44 Past Versions:
45
46 Version 1.12: (INDI 1.9.3)
47 - New timeout functions in INDI which significantly reduce startup times waiting for detection to fail. (Min time before was 1 second, current timeout for those is now set to 100 ms (100000 us which works well even with an Arduino Mega (Ramps) setup)
48 - Cleanup and completely control TrackState. (Should eliminate various issues.)
49 - Behind the scenes: More consistent command declarations (Should eliminate a type of error that's happened in the past when changing commands.)
50 - Don't report capability for PierSide and PEC unless supported (This will cause a call to updateProperties so a bunch of messages will be repeated.)
51 - From the last, move where the SlewRate values are defined to updateProperties, vs initProperties so that the extra calls to updateProperties don't mangle it.
52 - TMC driver reports are now human readable.
53 - Detects OnStep or OnStepX version (doesn't do much with it.)
54
55
56 Version 1.11: (INDI 1.9.2)
57 - Fixed one issue with tracking (Jamie Flinn/jamiecflinn)
58 Version 1.10: (finalized: INDI 1.9.1)
59 - Weather support for setting temperature/humidity/pressure, values will be overridden in OnStep by any sensor values.
60 - Ability to swap primary focuser.
61 - High precision on location, and not overridding GPS even when marked for Mount > KStars.
62 - Added Rotator & De-Rotator Support
63 - TMC_SPI status reported (RAW) on the Status Tab. (ST = Standstill, Ox = open load A/B, Gx = grounded A/B, OT = Overtemp Shutdown, PW = Overtemp Prewarning)
64 - Manage OnStep Auxiliary Feature Names in Output Tab
65
66 Version 1.9:
67 - Weather support for Reading temperature/humidity/pressure (Values are Read-Only)
68 - Bugfix: Slew speed
69
70 Version 1.8:
71 - Bugfixes for FORK mounted scopes
72
73 Version 1.7:
74 - Added support for Reporting Guide rate (to PHD2 among others)
75 - Updated Error codes to match up with Android/SHC (Unknown reserved for unknown, so Unspecified = Unknown on other platforms)
76 - Added descriptions to SlewRate to match, slider kept which matches OnStep values
77 - Support for up to 9 stars for alignment
78 - Changed align so the last step isn't the (Optional) Write to EEPROM
79 - Added support for polar adjustments, without having to redo the entire model. (:MP# command)
80 - Support for Full Compensation/Refraction only, and 1/2 Axis tracking
81 - Cleanups
82
83 Version 1.6: Additional Functions
84 - James Lan fixed Meredian Flip and Home Pause buttons
85 - Cleaned Comments from previon versions
86 - Updated lastError Codes
87 - azwing typo minutes ' > second ''for Alignment Error
88
89 Version 1.5: Cleaning and Align Code Tuning
90 - James Lan Align Code
91 - Cleaning out debug messages
92 - Fix some TrackState inconsistencies with Ekos
93 - removing old Align Code
94 - fixing reversed Alt/Azm coorection values
95
96 Version 1.4: Tuning
97 - James Lan implementation of High Precision Tracking
98 - James lan Focuser Code
99 - James lan PEC
100 - James Lan Alignment
101 - Azwing set all com variable legth to RB_MAX_LEN otherwise crash due to overflow
102 - Azwing set local variable size to RB_MAX_LEN otherwise erased by overflow preventing Align and other stuf to work
103 - James Lan Align Tab implementation
104 - Azwing Removed Alignment in main tab
105 - Azwing minor typo fixes
106 - Azwing reworked TrackState especially for parking/unparking
107
108 Version 1.3: Complete rework of interface and functionalities
109 - Telescope Status using :GU#
110 - Parking Management
111 - Star Alignment
112 - Tracking Frequency
113 - Focuser rework
114
115 Version 1.2: Initial issue
116
117 */
118
119 #pragma once
120
121 #include "lx200generic.h"cxx . . $ `<file>/drivers/telescope/lx200generic.h`/
122 #include "lx200driver.h"cxx . . $ `<file>/drivers/telescope/lx200driver.h`/
123 #include "indicom.h"cxx . . $ `<file>/libs/indicore/indicom.h`/
124 #include "indifocuserinterface.h"cxx . . $ `<file>/libs/indibase/indifocuserinterface.h`/
125 #include "indiweatherinterface.h"cxx . . $ `<file>/libs/indibase/indiweatherinterface.h`/
126 #include "indirotatorinterface.h"cxx . . $ `<file>/libs/indibase/indirotatorinterface.h`/
127 #include "connectionplugins/connectiontcp.h"cxx . . $ `<file>/libs/indibase/connectionplugins/connectiontcp.h`/
128
129
130 #include <cstring>
131 #include <unistd.h>
132 #include <termios.h>
133 #include <stdlib.h>
134
135 #define RB_MAX_LENcxx . . $ `drivers/telescope/lx200_OnStep.h:135:9`! 64
136 #define CMD_MAX_LENcxx . . $ `drivers/telescope/lx200_OnStep.h:136:9`! 32
137
138 #define setParkOnStepcxx . . $ `drivers/telescope/lx200_OnStep.h:138:9`!(fd) write(fd, "#:hQ#", 5)
139 #define ReticPluscxx . . $ `drivers/telescope/lx200_OnStep.h:139:9`!(fd) write(fd, "#:B+#", 5)
140 #define ReticMoinscxx . . $ `drivers/telescope/lx200_OnStep.h:140:9`!(fd) write(fd, "#:B-#", 5)
141 #define OnStepalign1cxx . . $ `drivers/telescope/lx200_OnStep.h:141:9`!(fd) write(fd, "#:A1#", 5)
142 #define OnStepalign2cxx . . $ `drivers/telescope/lx200_OnStep.h:142:9`!(fd) write(fd, "#:A2#", 5)
143 #define OnStepalign3cxx . . $ `drivers/telescope/lx200_OnStep.h:143:9`!(fd) write(fd, "#:A3#", 5)
144 #define OnStepalignOKcxx . . $ `drivers/telescope/lx200_OnStep.h:144:9`!(fd) write(fd, "#:A+#", 5)
145 #define OnStepcxx . . $ `drivers/telescope/lx200_OnStep.h:145:9`!
146 #define RB_MAX_LENcxx . . $ `drivers/telescope/lx200_OnStep.h:146:9`! 64
147
148 #define PORTS_COUNTcxx . . $ `drivers/telescope/lx200_OnStep.h:148:9`! 10
149 #define STARTING_PORTcxx . . $ `drivers/telescope/lx200_OnStep.h:149:9`! 0
150
151 enum ResponseErrorscxx . . $ ResponseErrors# {RES_ERR_FORMATcxx . . $ RES_ERR_FORMAT. = -1001};
152
153 enum Errorscxx . . $ Errors# {ERR_NONEcxx . . $ ERR_NONE., ERR_MOTOR_FAULTcxx . . $ ERR_MOTOR_FAULT., ERR_ALT_MINcxx . . $ ERR_ALT_MIN., ERR_LIMIT_SENSEcxx . . $ ERR_LIMIT_SENSE., ERR_DECcxx . . $ ERR_DEC., ERR_AZMcxx . . $ ERR_AZM., ERR_UNDER_POLEcxx . . $ ERR_UNDER_POLE., ERR_MERIDIANcxx . . $ ERR_MERIDIAN., ERR_SYNCcxx . . $ ERR_SYNC., ERR_PARKcxx . . $ ERR_PARK., ERR_GOTO_SYNCcxx . . $ ERR_GOTO_SYNC., ERR_UNSPECIFIEDcxx . . $ ERR_UNSPECIFIED., ERR_ALT_MAXcxx . . $ ERR_ALT_MAX., ERR_GOTO_ERR_NONEcxx . . $ ERR_GOTO_ERR_NONE., ERR_GOTO_ERR_BELOW_HORIZONcxx . . $ ERR_GOTO_ERR_BELOW_HORIZON., ERR_GOTO_ERR_ABOVE_OVERHEADcxx . . $ ERR_GOTO_ERR_ABOVE_OVERHEAD., ERR_GOTO_ERR_STANDBYcxx . . $ ERR_GOTO_ERR_STANDBY., ERR_GOTO_ERR_PARKcxx . . $ ERR_GOTO_ERR_PARK., ERR_GOTO_ERR_GOTOcxx . . $ ERR_GOTO_ERR_GOTO., ERR_GOTO_ERR_OUTSIDE_LIMITScxx . . $ ERR_GOTO_ERR_OUTSIDE_LIMITS., ERR_GOTO_ERR_HARDWARE_FAULTcxx . . $ ERR_GOTO_ERR_HARDWARE_FAULT., ERR_GOTO_ERR_IN_MOTIONcxx . . $ ERR_GOTO_ERR_IN_MOTION., ERR_GOTO_ERR_UNSPECIFIEDcxx . . $ ERR_GOTO_ERR_UNSPECIFIED.};
154 enum RateCompensationcxx . . $ RateCompensation# {RC_NONEcxx . . $ RC_NONE., RC_REFR_RAcxx . . $ RC_REFR_RA., RC_REFR_BOTHcxx . . $ RC_REFR_BOTH., RC_FULL_RAcxx . . $ RC_FULL_RA., RC_FULL_BOTHcxx . . $ RC_FULL_BOTH.}; //To allow for using one variable instead of two in the future
155
156 enum MountTypecxx . . $ MountType# {MOUNTTYPE_GEMcxx . . $ MOUNTTYPE_GEM., MOUNTTYPE_FORKcxx . . $ MOUNTTYPE_FORK., MOUNTTYPE_FORK_ALTcxx . . $ MOUNTTYPE_FORK_ALT., MOUNTTYPE_ALTAZcxx . . $ MOUNTTYPE_ALTAZ.};
157
158 enum OnStepVersioncxx . . $ OnStepVersion# {OSV_UNKNOWNcxx . . $ OSV_UNKNOWN., OSV_OnStepV1or2cxx . . $ OSV_OnStepV1or2., OSV_OnStepV3cxx . . $ OSV_OnStepV3., OSV_OnStepV4cxx . . $ OSV_OnStepV4., OSV_OnStepV5cxx . . $ OSV_OnStepV5., OSV_OnStepXcxx . . $ OSV_OnStepX.};
159
160 class LX200_OnStepcxx . . $ LX200_OnStep# : public LX200Genericcxx . . $ LX200Generic#, public INDIcxx . . $ INDI/::WeatherInterfacecxx . . $ INDI/WeatherInterface#, public INDIcxx . . $ INDI/::RotatorInterfacecxx . . $ INDI/RotatorInterface#
161 {
162 public:
163 LX200_OnStepcxx . . $ LX200_OnStep#LX200_OnStep(49f6e7a06ebc5aa8).();
164 ~cxx . . $ LX200_OnStep#`~LX200_OnStep`(49f6e7a06ebc5aa8).LX200_OnStepcxx . . $ LX200_OnStep#() {}
165
166 virtual const char *getDefaultNamecxx . . $ LX200_OnStep#getDefaultName(33a1f659e94feb42).() override;
167 virtual bool initPropertiescxx . . $ LX200_OnStep#initProperties(c9857a73d68e59ba).() override;
168 virtual void ISGetPropertiescxx . . $ LX200_OnStep#ISGetProperties(85c52e162fed56f9).(const char *dev) override;
169 virtual bool updatePropertiescxx . . $ LX200_OnStep#updateProperties(c9857a73d68e59ba).() override;
170 virtual bool ISNewNumbercxx . . $ LX200_OnStep#ISNewNumber(b910d3521abb33fb).(const char *dev, const char *name, double values[], char *names[], int n) override;
171 virtual bool ISNewSwitchcxx . . $ LX200_OnStep#ISNewSwitch(e439c05866add404).(const char *dev, const char *name, ISStatecxx . . $ ISState# *states, char *names[], int n) override;
172
173 protected:
174 virtual void getBasicDatacxx . . $ LX200_OnStep#getBasicData(49f6e7a06ebc5aa8).() override;
175 virtual bool Parkcxx . . $ LX200_OnStep#Park(c9857a73d68e59ba).() override;
176 virtual bool UnParkcxx . . $ LX200_OnStep#UnPark(c9857a73d68e59ba).() override;
177 virtual bool SetCurrentParkcxx . . $ LX200_OnStep#SetCurrentPark(c9857a73d68e59ba).() override;
178 virtual bool SetDefaultParkcxx . . $ LX200_OnStep#SetDefaultPark(c9857a73d68e59ba).() override;
179 virtual bool SetTrackEnabledcxx . . $ LX200_OnStep#SetTrackEnabled(efaadfb7dc14930a).(bool enabled) override;
180 virtual bool updateLocationcxx . . $ LX200_OnStep#updateLocation(c3c51e0645da350e).(double latitude, double longitude, double elevation) override;
181 virtual bool setLocalDatecxx . . $ LX200_OnStep#setLocalDate(b3bfc27f28ee201d).(uint8_tcxx . . $ uint8_t# days, uint8_tcxx . . $ uint8_t# months, uint16_tcxx . . $ uint16_t# years) override;
182 virtual bool ReadScopeStatuscxx . . $ LX200_OnStep#ReadScopeStatus(c9857a73d68e59ba).() override;
183 virtual int setSiteLongitudecxx . . $ LX200_OnStep#setSiteLongitude(4f20ba582a324361).(int fd, double Long);
184 virtual int setSiteLatitudecxx . . $ LX200_OnStep#setSiteLatitude(4f20ba582a324361).(int fd, double Long);
185 virtual bool SetTrackRatecxx . . $ LX200_OnStep#SetTrackRate(828b76dce88fac).(double raRate, double deRate) override;
186 virtual void slewErrorcxx . . $ LX200_OnStep#slewError(d4f767463ce0a6b3).(int slewCode) override;
187 virtual bool Synccxx . . $ LX200_OnStep#Sync(828b76dce88fac).(double ra, double dec) override;
188
189 virtual bool saveConfigItemscxx . . $ LX200_OnStep#saveConfigItems(dc9e5a301483124c).(FILE *fp) override;
190 virtual void Init_Outputscxx . . $ LX200_OnStep#Init_Outputs(49f6e7a06ebc5aa8).();
191
192 //Mount information
193 MountTypecxx . . $ MountType# OSMountTypecxx . . $ LX200_OnStep#OSMountType. = MOUNTTYPE_GEMcxx . . $ MOUNTTYPE_GEM.; //default to GEM
194 /* 0 = EQ mount (Presumed default for most things.)
195 * 1 = Fork
196 * 2 = Fork Alt
197 * 3 = Alt Azm
198 */
199
200 virtual bool sendScopeTimecxx . . $ LX200_OnStep#sendScopeTime(c9857a73d68e59ba).() override;
201 virtual bool sendScopeLocationcxx . . $ LX200_OnStep#sendScopeLocation(c9857a73d68e59ba).() override;
202 virtual bool setUTCOffsetcxx . . $ LX200_OnStep#setUTCOffset(f8197d536af80c96).(double offset) override; //azwing fix after change in lx200driver.cpp
203
204 // Goto
205 virtual bool Gotocxx . . $ LX200_OnStep#Goto(828b76dce88fac).(double ra, double dec) override;
206
207 //FocuserInterface
208
209 IPStatecxx . . $ IPState# MoveFocusercxx . . $ LX200_OnStep#MoveFocuser(f8c0af5a0f4a7042).(FocusDirectioncxx . . $ INDI/FocuserInterface#FocusDirection# dir, int speed, uint16_tcxx . . $ uint16_t# duration) override;
210 IPStatecxx . . $ IPState# MoveAbsFocusercxx . . $ LX200_OnStep#MoveAbsFocuser(e933ec4323fbb8bc). (uint32_tcxx . . $ uint32_t# targetTicks) override;
211 IPStatecxx . . $ IPState# MoveRelFocusercxx . . $ LX200_OnStep#MoveRelFocuser(7f9c1e68e57c0ac9). (FocusDirectioncxx . . $ INDI/FocuserInterface#FocusDirection# dir, uint32_tcxx . . $ uint32_t# ticks) override;
212 bool AbortFocusercxx . . $ LX200_OnStep#AbortFocuser(c9857a73d68e59ba). () override;
213
214 //End FocuserInterface
215
216 //RotatorInterface
217
218 IPStatecxx . . $ IPState# MoveRotatorcxx . . $ LX200_OnStep#MoveRotator(962e0c922eecd788).(double angle) override;
219 // bool SyncRotator(double angle) override;
220 IPStatecxx . . $ IPState# HomeRotatorcxx . . $ LX200_OnStep#HomeRotator(dd764fd8e59c78c4).() override;
221 // bool ReverseRotator(bool enabled) override;
222 bool AbortRotatorcxx . . $ LX200_OnStep#AbortRotator(c9857a73d68e59ba).() override;
223 bool SetRotatorBacklashcxx . . $ LX200_OnStep#SetRotatorBacklash(83c267b20bac841a). (int32_t steps) override;
224 bool SetRotatorBacklashEnabledcxx . . $ LX200_OnStep#SetRotatorBacklashEnabled(efaadfb7dc14930a).(bool enabled) override;
225
226 //End RotatorInterface
227
228 //PECInterface
229 //axis 0=RA, 1=DEC, others?
230 IPStatecxx . . $ IPState# StopPECPlaybackcxx . . $ LX200_OnStep#StopPECPlayback(41782460a909f477). (int axis);
231 IPStatecxx . . $ IPState# StartPECPlaybackcxx . . $ LX200_OnStep#StartPECPlayback(41782460a909f477). (int axis);
232 IPStatecxx . . $ IPState# ClearPECBuffercxx . . $ LX200_OnStep#ClearPECBuffer(41782460a909f477). (int axis);
233 IPStatecxx . . $ IPState# StartPECRecordcxx . . $ LX200_OnStep#StartPECRecord(41782460a909f477). (int axis);
234 IPStatecxx . . $ IPState# SavePECBuffercxx . . $ LX200_OnStep#SavePECBuffer(41782460a909f477). (int axis);
235 IPStatecxx . . $ IPState# PECStatuscxx . . $ LX200_OnStep#PECStatus(41782460a909f477). (int axis);
236 IPStatecxx . . $ IPState# ReadPECBuffercxx . . $ LX200_OnStep#ReadPECBuffer(41782460a909f477). (int axis);
237 IPStatecxx . . $ IPState# WritePECBuffercxx . . $ LX200_OnStep#WritePECBuffer(41782460a909f477). (int axis);
238 bool ISPECRecordedcxx . . $ LX200_OnStep#ISPECRecorded(83c267b20bac841a). (int axis);
239 bool OSPECEnabledcxx . . $ LX200_OnStep#OSPECEnabled. = false;
240 bool OSPECviaGUcxx . . $ LX200_OnStep#OSPECviaGU. = false; //Older versions use :QZ# for PEC status, new can use the standard :GU#/:Gu#
241 //End PECInterface
242
243
244 //NewGeometricAlignment
245 IPStatecxx . . $ IPState# AlignStartGeometriccxx . . $ LX200_OnStep#AlignStartGeometric(41782460a909f477).(int stars);
246
247 /**
248 * @brief AlignStartGeometric starts the OnStep Multistar align process.
249 * @brief Max of 9 stars,
250 * @param stars Number of stars to be included. If stars is more than the controller supports, it will be reduced.
251 * @return IPS_BUSY if no issues, IPS_ALERT if commands don't get the expected response.
252 */
253
254 IPStatecxx . . $ IPState# AlignAddStarcxx . . $ LX200_OnStep#AlignAddStar(dd764fd8e59c78c4).();
255 IPStatecxx . . $ IPState# AlignDonecxx . . $ LX200_OnStep#AlignDone(dd764fd8e59c78c4).();
256 IPStatecxx . . $ IPState# AlignWritecxx . . $ LX200_OnStep#AlignWrite(dd764fd8e59c78c4).();
257 virtual bool UpdateAlignStatuscxx . . $ LX200_OnStep#UpdateAlignStatus(c9857a73d68e59ba).();
258 virtual bool UpdateAlignErrcxx . . $ LX200_OnStep#UpdateAlignErr(c9857a73d68e59ba).();
259 //End NewGeometricAlignment
260 bool OSAlignCompletedcxx . . $ LX200_OnStep#OSAlignCompleted. = false;
261
262 //Outputs
263 IPStatecxx . . $ IPState# OSEnableOutputcxx . . $ LX200_OnStep#OSEnableOutput(41782460a909f477).(int output);
264 IPStatecxx . . $ IPState# OSDisableOutputcxx . . $ LX200_OnStep#OSDisableOutput(41782460a909f477).(int output);
265 bool OSGetOutputStatecxx . . $ LX200_OnStep#OSGetOutputState(83c267b20bac841a).(int output);
266
267
268 bool sendOnStepCommandcxx . . $ LX200_OnStep#sendOnStepCommand(c5f7da30cbc0f4e9).(const char *cmd);
269 bool sendOnStepCommandBlindcxx . . $ LX200_OnStep#sendOnStepCommandBlind(c5f7da30cbc0f4e9).(const char *cmd);
270 int flushIOcxx . . $ LX200_OnStep#flushIO(7864480464b09eea).(int fd);
271 int getCommandSingleCharResponsecxx . . $ LX200_OnStep#getCommandSingleCharResponse(2a3ee0fff8d8b8ec).(int fd, char *data, const char *cmd); //Reimplemented from getCommandString
272 int getCommandSingleCharErrorOrLongResponsecxx . . $ LX200_OnStep#getCommandSingleCharErrorOrLongResponse(2a3ee0fff8d8b8ec).(int fd, char *data, const char *cmd); //Reimplemented from getCommandString
273 int getCommandDoubleResponsecxx . . $ LX200_OnStep#getCommandDoubleResponse(35ce84d0aa7870f6).(int fd, double *value, char *data,
274 const char *cmd); //Reimplemented from getCommandString Will return a double, and raw value.
275 int getCommandIntResponsecxx . . $ LX200_OnStep#getCommandIntResponse(14f024bc39495d).(int fd, int *value, char *data, const char *cmd);
276 int setMinElevationLimitcxx . . $ LX200_OnStep#setMinElevationLimit(9b79fb6aee4c0440).(int fd, int max);
277 int OSUpdateFocusercxx . . $ LX200_OnStep#OSUpdateFocuser(b126dc7c1de90089).(); //Return = 0 good, -1 = Communication error
278 int OSUpdateRotatorcxx . . $ LX200_OnStep#OSUpdateRotator(b126dc7c1de90089).(); //Return = 0 good, -1 = Communication error
279
280 ITextVectorPropertycxx . . $ ITextVectorProperty# ObjectInfoTPcxx . . $ LX200_OnStep#ObjectInfoTP.;
281 ITextcxx . . $ IText# ObjectInfoTcxx . . $ LX200_OnStep#ObjectInfoT.[1] {};
282
283 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# StarCatalogSPcxx . . $ LX200_OnStep#StarCatalogSP.;
284 ISwitchcxx . . $ ISwitch# StarCatalogScxx . . $ LX200_OnStep#StarCatalogS.[3];
285
286 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# DeepSkyCatalogSPcxx . . $ LX200_OnStep#DeepSkyCatalogSP.;
287 ISwitchcxx . . $ ISwitch# DeepSkyCatalogScxx . . $ LX200_OnStep#DeepSkyCatalogS.[7];
288
289 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# SolarSPcxx . . $ LX200_OnStep#SolarSP.;
290 ISwitchcxx . . $ ISwitch# SolarScxx . . $ LX200_OnStep#SolarS.[10];
291
292 INumberVectorPropertycxx . . $ INumberVectorProperty# ObjectNoNPcxx . . $ LX200_OnStep#ObjectNoNP.;
293 INumbercxx . . $ INumber# ObjectNoNcxx . . $ LX200_OnStep#ObjectNoN.[1];
294
295 INumberVectorPropertycxx . . $ INumberVectorProperty# MaxSlewRateNPcxx . . $ LX200_OnStep#MaxSlewRateNP.;
296 INumbercxx . . $ INumber# MaxSlewRateNcxx . . $ LX200_OnStep#MaxSlewRateN.[2];
297
298 INumberVectorPropertycxx . . $ INumberVectorProperty# BacklashNPcxx . . $ LX200_OnStep#BacklashNP.; //test
299 INumbercxx . . $ INumber# BacklashNcxx . . $ LX200_OnStep#BacklashN.[2]; //Test
300
301 INumberVectorPropertycxx . . $ INumberVectorProperty# ElevationLimitNPcxx . . $ LX200_OnStep#ElevationLimitNP.;
302 INumbercxx . . $ INumber# ElevationLimitNcxx . . $ LX200_OnStep#ElevationLimitN.[2];
303
304 ITextVectorPropertycxx . . $ ITextVectorProperty# VersionTPcxx . . $ LX200_OnStep#VersionTP.;
305 ITextcxx . . $ IText# VersionTcxx . . $ LX200_OnStep#VersionT.[5] {};
306
307 OnStepVersioncxx . . $ OnStepVersion# OnStepMountVersioncxx . . $ LX200_OnStep#OnStepMountVersion. = OSV_UNKNOWNcxx . . $ OSV_UNKNOWN.;
308
309 long int OSTimeoutSecondscxx . . $ LX200_OnStep#OSTimeoutSeconds. = 0;
310 long int OSTimeoutMicroSecondscxx . . $ LX200_OnStep#OSTimeoutMicroSeconds. = 100000;
311
312 // OnStep Status controls
313 ITextVectorPropertycxx . . $ ITextVectorProperty# OnstepStatTPcxx . . $ LX200_OnStep#OnstepStatTP.;
314 ITextcxx . . $ IText# OnstepStatcxx . . $ LX200_OnStep#OnstepStat.[11] {};
315
316 bool TMCDriverscxx . . $ LX200_OnStep#TMCDrivers. = true; //Set to false if it doesn't detect TMC_SPI reporting. (Small delay on connection/first update)
317 bool OSHighPrecisioncxx . . $ LX200_OnStep#OSHighPrecision. = false;
318
319 // Focuser controls
320 // Focuser 1
321 bool OSFocuser1cxx . . $ LX200_OnStep#OSFocuser1. = false;
322 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# OSFocus1InitializeSPcxx . . $ LX200_OnStep#OSFocus1InitializeSP.;
323 ISwitchcxx . . $ ISwitch# OSFocus1InitializeScxx . . $ LX200_OnStep#OSFocus1InitializeS.[4];
324
325 int OSNumFocuserscxx . . $ LX200_OnStep#OSNumFocusers. = 0;
326 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# OSFocusSelectSPcxx . . $ LX200_OnStep#OSFocusSelectSP.;
327 ISwitchcxx . . $ ISwitch# OSFocusSelectScxx . . $ LX200_OnStep#OSFocusSelectS.[9];
328
329 // Focuser 2
330 //ISwitchVectorProperty OSFocus2SelSP;
331 //ISwitch OSFocus2SelS[2];
332 bool OSFocuser2cxx . . $ LX200_OnStep#OSFocuser2. = false;
333 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# OSFocus2RateSPcxx . . $ LX200_OnStep#OSFocus2RateSP.;
334 ISwitchcxx . . $ ISwitch# OSFocus2RateScxx . . $ LX200_OnStep#OSFocus2RateS.[4];
335
336 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# OSFocus2MotionSPcxx . . $ LX200_OnStep#OSFocus2MotionSP.;
337 ISwitchcxx . . $ ISwitch# OSFocus2MotionScxx . . $ LX200_OnStep#OSFocus2MotionS.[3];
338
339 INumberVectorPropertycxx . . $ INumberVectorProperty# OSFocus2TargNPcxx . . $ LX200_OnStep#OSFocus2TargNP.;
340 INumbercxx . . $ INumber# OSFocus2TargNcxx . . $ LX200_OnStep#OSFocus2TargN.[1];
341
342 //Rotator - Some handled by RotatorInterface, but that's mostly for rotation only, absolute, and... very limited.
343 bool OSRotator1cxx . . $ LX200_OnStep#OSRotator1. = false; //Change to false after detection code
344 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# OSRotatorRateSPcxx . . $ LX200_OnStep#OSRotatorRateSP.;
345 ISwitchcxx . . $ ISwitch# OSRotatorRateScxx . . $ LX200_OnStep#OSRotatorRateS.[4]; //Set rate
346
347 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# OSRotatorDerotateSPcxx . . $ LX200_OnStep#OSRotatorDerotateSP.;
348 ISwitchcxx . . $ ISwitch# OSRotatorDerotateScxx . . $ LX200_OnStep#OSRotatorDerotateS.[2]; //On or Off
349
350
351
352 int IsTrackingcxx . . $ LX200_OnStep#IsTracking. = 0;
353
354 // Reticle +/- Buttons
355 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# ReticSPcxx . . $ LX200_OnStep#ReticSP.;
356 ISwitchcxx . . $ ISwitch# ReticScxx . . $ LX200_OnStep#ReticS.[2];
357
358 // Align Buttons
359 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# TrackCompSPcxx . . $ LX200_OnStep#TrackCompSP.;
360 ISwitchcxx . . $ ISwitch# TrackCompScxx . . $ LX200_OnStep#TrackCompS.[3];
361
362 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# TrackAxisSPcxx . . $ LX200_OnStep#TrackAxisSP.;
363 ISwitchcxx . . $ ISwitch# TrackAxisScxx . . $ LX200_OnStep#TrackAxisS.[3];
364
365 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# FrequencyAdjustSPcxx . . $ LX200_OnStep#FrequencyAdjustSP.;
366 ISwitchcxx . . $ ISwitch# FrequencyAdjustScxx . . $ LX200_OnStep#FrequencyAdjustS.[3];
367
368 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# AutoFlipSPcxx . . $ LX200_OnStep#AutoFlipSP.;
369 ISwitchcxx . . $ ISwitch# AutoFlipScxx . . $ LX200_OnStep#AutoFlipS.[2];
370
371 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# HomePauseSPcxx . . $ LX200_OnStep#HomePauseSP.;
372 ISwitchcxx . . $ ISwitch# HomePauseScxx . . $ LX200_OnStep#HomePauseS.[3];
373
374 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# SetHomeSPcxx . . $ LX200_OnStep#SetHomeSP.;
375 ISwitchcxx . . $ ISwitch# SetHomeScxx . . $ LX200_OnStep#SetHomeS.[2];
376
377 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# PreferredPierSideSPcxx . . $ LX200_OnStep#PreferredPierSideSP.;
378 ISwitchcxx . . $ ISwitch# PreferredPierSideScxx . . $ LX200_OnStep#PreferredPierSideS.[3];
379
380 INumberVectorPropertycxx . . $ INumberVectorProperty# minutesPastMeridianNPcxx . . $ LX200_OnStep#minutesPastMeridianNP.;
381 INumbercxx . . $ INumber# minutesPastMeridianNcxx . . $ LX200_OnStep#minutesPastMeridianN.[2];
382
383 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# OSPECStatusSPcxx . . $ LX200_OnStep#OSPECStatusSP.;
384 ISwitchcxx . . $ ISwitch# OSPECStatusScxx . . $ LX200_OnStep#OSPECStatusS.[5];
385 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# OSPECIndexSPcxx . . $ LX200_OnStep#OSPECIndexSP.;
386 ISwitchcxx . . $ ISwitch# OSPECIndexScxx . . $ LX200_OnStep#OSPECIndexS.[2];
387 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# OSPECRecordSPcxx . . $ LX200_OnStep#OSPECRecordSP.;
388 ISwitchcxx . . $ ISwitch# OSPECRecordScxx . . $ LX200_OnStep#OSPECRecordS.[3];
389 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# OSPECReadSPcxx . . $ LX200_OnStep#OSPECReadSP.;
390 ISwitchcxx . . $ ISwitch# OSPECReadScxx . . $ LX200_OnStep#OSPECReadS.[2];
391 INumberVectorPropertycxx . . $ INumberVectorProperty# OSPECCurrentIndexNPcxx . . $ LX200_OnStep#OSPECCurrentIndexNP.;
392 INumbercxx . . $ INumber# OSPECCurrentIndexNcxx . . $ LX200_OnStep#OSPECCurrentIndexN.[2];
393 INumberVectorPropertycxx . . $ INumberVectorProperty# OSPECUserIndexNPcxx . . $ LX200_OnStep#OSPECUserIndexNP.;
394 INumbercxx . . $ INumber# OSPECUserIndexNcxx . . $ LX200_OnStep#OSPECUserIndexN.[2];
395 INumberVectorPropertycxx . . $ INumberVectorProperty# OSPECRWValuesNPcxx . . $ LX200_OnStep#OSPECRWValuesNP.;
396 INumbercxx . . $ INumber# OSPECRWValuesNcxx . . $ LX200_OnStep#OSPECRWValuesN.[2]; //Current Index and User Index
397
398 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# OSNAlignStarsSPcxx . . $ LX200_OnStep#OSNAlignStarsSP.;
399 ISwitchcxx . . $ ISwitch# OSNAlignStarsScxx . . $ LX200_OnStep#OSNAlignStarsS.[9];
400 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# OSNAlignSPcxx . . $ LX200_OnStep#OSNAlignSP.;
401 ISwitchcxx . . $ ISwitch# OSNAlignScxx . . $ LX200_OnStep#OSNAlignS.[4];
402 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# OSNAlignWriteSPcxx . . $ LX200_OnStep#OSNAlignWriteSP.;
403 ISwitchcxx . . $ ISwitch# OSNAlignWriteScxx . . $ LX200_OnStep#OSNAlignWriteS.[1];
404 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# OSNAlignPolarRealignSPcxx . . $ LX200_OnStep#OSNAlignPolarRealignSP.;
405 ISwitchcxx . . $ ISwitch# OSNAlignPolarRealignScxx . . $ LX200_OnStep#OSNAlignPolarRealignS.[2];
406 ITextcxx . . $ IText# OSNAlignTcxx . . $ LX200_OnStep#OSNAlignT.[8] {};
407 ITextVectorPropertycxx . . $ ITextVectorProperty# OSNAlignTPcxx . . $ LX200_OnStep#OSNAlignTP.;
408 ITextcxx . . $ IText# OSNAlignErrTcxx . . $ LX200_OnStep#OSNAlignErrT.[4] {};
409 ITextVectorPropertycxx . . $ ITextVectorProperty# OSNAlignErrTPcxx . . $ LX200_OnStep#OSNAlignErrTP.;
410 char OSNAlignStatcxx . . $ LX200_OnStep#OSNAlignStat.[RB_MAX_LENcxx . . $ `drivers/telescope/lx200_OnStep.h:146:9`!];
411
412 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# OSOutput1SPcxx . . $ LX200_OnStep#OSOutput1SP.;
413 ISwitchcxx . . $ ISwitch# OSOutput1Scxx . . $ LX200_OnStep#OSOutput1S.[2];
414 ISwitchVectorPropertycxx . . $ ISwitchVectorProperty# OSOutput2SPcxx . . $ LX200_OnStep#OSOutput2SP.;
415 ISwitchcxx . . $ ISwitch# OSOutput2Scxx . . $ LX200_OnStep#OSOutput2S.[2];
416
417
418 INumbercxx . . $ INumber# OutputPortscxx . . $ LX200_OnStep#OutputPorts.[PORTS_COUNTcxx . . $ `drivers/telescope/lx200_OnStep.h:148:9`!];
419 INumberVectorPropertycxx . . $ INumberVectorProperty# OutputPorts_NPcxx . . $ LX200_OnStep#OutputPorts_NP.;
420 bool OSHasOutputscxx . . $ LX200_OnStep#OSHasOutputs. = true;
421
422 INumbercxx . . $ INumber# GuideRateNcxx . . $ LX200_OnStep#GuideRateN.[2];
423 INumberVectorPropertycxx . . $ INumberVectorProperty# GuideRateNPcxx . . $ LX200_OnStep#GuideRateNP.;
424
425 char OSStatcxx . . $ LX200_OnStep#OSStat.[RB_MAX_LENcxx . . $ `drivers/telescope/lx200_OnStep.h:146:9`!];
426 char OldOSStatcxx . . $ LX200_OnStep#OldOSStat.[RB_MAX_LENcxx . . $ `drivers/telescope/lx200_OnStep.h:146:9`!];
427
428
429 char OSPiercxx . . $ LX200_OnStep#OSPier.[RB_MAX_LENcxx . . $ `drivers/telescope/lx200_OnStep.h:146:9`!];
430 char OldOSPiercxx . . $ LX200_OnStep#OldOSPier.[RB_MAX_LENcxx . . $ `drivers/telescope/lx200_OnStep.h:146:9`!];
431
432 bool OSSeparate_Pulse_Guide_Ratecxx . . $ LX200_OnStep#OSSeparate_Pulse_Guide_Rate. = false;
433 bool OSSupports_bitfield_Gucxx . . $ LX200_OnStep#OSSupports_bitfield_Gu. = false;
434 uint8_tcxx . . $ uint8_t# PECStatusGUcxx . . $ LX200_OnStep#PECStatusGU. = 0;
435 uint8_tcxx . . $ uint8_t# ParkStatusGUcxx . . $ LX200_OnStep#ParkStatusGU. = 0;
436
437 // Weather support
438 // NOTE: Much is handled by WeatherInterface, these controls are mainly for setting values which are not detected
439 // As of right now, if there is a sensor the values will be overwritten on the next update
440 bool OSCpuTemp_goodcxx . . $ LX200_OnStep#OSCpuTemp_good. =
441 true; //This can fail on some processors and take the timeout before an update, so if it fails, don't check again.
442
443
444 INumberVectorPropertycxx . . $ INumberVectorProperty# OSSetTemperatureNPcxx . . $ LX200_OnStep#OSSetTemperatureNP.;
445 INumbercxx . . $ INumber# OSSetTemperatureNcxx . . $ LX200_OnStep#OSSetTemperatureN.[1];
446 INumberVectorPropertycxx . . $ INumberVectorProperty# OSSetHumidityNPcxx . . $ LX200_OnStep#OSSetHumidityNP.;
447 INumbercxx . . $ INumber# OSSetHumidityNcxx . . $ LX200_OnStep#OSSetHumidityN.[1];
448 INumberVectorPropertycxx . . $ INumberVectorProperty# OSSetPressureNPcxx . . $ LX200_OnStep#OSSetPressureNP.;
449 INumbercxx . . $ INumber# OSSetPressureNcxx . . $ LX200_OnStep#OSSetPressureN.[1];
450 //Not sure why this would be used, but will feed to it from site settings
451 INumberVectorPropertycxx . . $ INumberVectorProperty# OSSetAltitudeNPcxx . . $ LX200_OnStep#OSSetAltitudeNP.;
452 INumbercxx . . $ INumber# OSSetAltitudeNcxx . . $ LX200_OnStep#OSSetAltitudeN.[1];
453
454
455 //This is updated via other commands, as such I'm going to ignore it like some others do.
456 virtual IPStatecxx . . $ IPState# updateWeathercxx . . $ LX200_OnStep#updateWeather(dd764fd8e59c78c4).() override
457 {
458 return IPS_OKcxx . . $ IPS_OK.;
459 }
460
461
462 /**
463 * @brief SyncParkStatus Update the state and switches for parking
464 * @param isparked True if parked, false otherwise.
465 */
466 virtual void SyncParkStatuscxx . . $ LX200_OnStep#SyncParkStatus(b45ddcbc8423892c).(bool isparked) override;
467
468 /**
469 * @brief SetParked Change the mount parking status. The data park file (stored in
470 * ~/.indi/ParkData.xml) is updated in the process.
471 * @param isparked set to true if parked, false otherwise.
472 */
473 virtual void SetParkedcxx . . $ LX200_OnStep#SetParked(b45ddcbc8423892c).(bool isparked) override;
474
475 /**
476 * @brief PrintTrackState will print to the debug log the status of TrackState if
477 * DEBUG_TRACKSTATE is defined otherwise it will simply return.
478 */
479 // #define DEBUG_TRACKSTATE
480 void PrintTrackStatecxx . . $ LX200_OnStep#PrintTrackState(49f6e7a06ebc5aa8).();
481
482 private:
483 int currentCatalogcxx . . $ LX200_OnStep#currentCatalog.;
484 int currentSubCatalogcxx . . $ LX200_OnStep#currentSubCatalog.;
485
486
487
488 };