Instrument Neutral Distributed Interface INDI  2.0.2
lx200_OnStep.h
Go to the documentation of this file.
1 /*
2  LX200 OnStep
3  based on LX200 Classic azwing (alain@zwingelstein.org)
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 (mutlaqja@ikarustech.com)-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.19
29  - fixed typo on debug information saying error instead of nbchar causing confusion
30  - fixed Autoflip Off update
31  - fixed Elevation Limits update (was not read from OnStep) and format set to integer and gage for setup
32  - fixed minutes passed meridian not showing actual values
33  - fixed missing slewrates defineProperty and deleteProperty causing redefinitions of overides
34  - todo focuser stops working after some time ??? could not yet reproduce
35  - fixed poll and update slew rates
36  - todo poll and update maximum slew speed SmartWebServer=>Settings
37  Version 1.18
38  - implemented Focuser T° compensation in FOCUSER TAB
39  - Minor fixes
40  Version 1.17
41  - fixed setMaxElevationLimit / setMinElevationLimit
42  Version 1.16
43  - fixed uninitialized UTC structure thanks to Norikyu
44  Version 1.15
45  - Fixed setUTCOffset after change in lx200driver to comply with OnStep format :SG[sHH]#
46  Version 1.14
47  - Modified range for Minutes Pas Meridian East and West to -180 .. +180
48  - Modified debug messages Minutes Pas Meridian (Was B"acklash ...)
49 
50  Version 1.13
51  - Timeouts and misc errors due to new behavior of SWS (SmartWebServer)
52  - - Timeouts still at 100ms for USB connections, if on a TCP/network connection timeout reverts to 2 sec.
53  - Improvements to Focuser and Rotator polling
54  - Focuser doesn't show up if not detected (Regression fixed)
55 
56  Past Versions:
57 
58  Version 1.12: (INDI 1.9.3)
59  - 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)
60  - Cleanup and completely control TrackState. (Should eliminate various issues.)
61  - Behind the scenes: More consistent command declarations (Should eliminate a type of error that's happened in the past when changing commands.)
62  - 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.)
63  - 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.
64  - TMC driver reports are now human readable.
65  - Detects OnStep or OnStepX version (doesn't do much with it.)
66 
67 
68  Version 1.11: (INDI 1.9.2)
69  - Fixed one issue with tracking (Jamie Flinn/jamiecflinn)
70  Version 1.10: (finalized: INDI 1.9.1)
71  - Weather support for setting temperature/humidity/pressure, values will be overridden in OnStep by any sensor values.
72  - Ability to swap primary focuser.
73  - High precision on location, and not overridding GPS even when marked for Mount > KStars.
74  - Added Rotator & De-Rotator Support
75  - 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)
76  - Manage OnStep Auxiliary Feature Names in Output Tab
77 
78  Version 1.9:
79  - Weather support for Reading temperature/humidity/pressure (Values are Read-Only)
80  - Bugfix: Slew speed
81 
82  Version 1.8:
83  - Bugfixes for FORK mounted scopes
84 
85  Version 1.7:
86  - Added support for Reporting Guide rate (to PHD2 among others)
87  - Updated Error codes to match up with Android/SHC (Unknown reserved for unknown, so Unspecified = Unknown on other platforms)
88  - Added descriptions to SlewRate to match, slider kept which matches OnStep values
89  - Support for up to 9 stars for alignment
90  - Changed align so the last step isn't the (Optional) Write to EEPROM
91  - Added support for polar adjustments, without having to redo the entire model. (:MP# command)
92  - Support for Full Compensation/Refraction only, and 1/2 Axis tracking
93  - Cleanups
94 
95  Version 1.6: Additional Functions
96  - James Lan fixed Meredian Flip and Home Pause buttons
97  - Cleaned Comments from previon versions
98  - Updated lastError Codes
99  - azwing typo minutes ' > second ''for Alignment Error
100 
101  Version 1.5: Cleaning and Align Code Tuning
102  - James Lan Align Code
103  - Cleaning out debug messages
104  - Fix some TrackState inconsistencies with Ekos
105  - removing old Align Code
106  - fixing reversed Alt/Azm coorection values
107 
108  Version 1.4: Tuning
109  - James Lan implementation of High Precision Tracking
110  - James lan Focuser Code
111  - James lan PEC
112  - James Lan Alignment
113  - Azwing set all com variable legth to RB_MAX_LEN otherwise crash due to overflow
114  - Azwing set local variable size to RB_MAX_LEN otherwise erased by overflow preventing Align and other stuf to work
115  - James Lan Align Tab implementation
116  - Azwing Removed Alignment in main tab
117  - Azwing minor typo fixes
118  - Azwing reworked TrackState especially for parking/unparking
119 
120  Version 1.3: Complete rework of interface and functionalities
121  - Telescope Status using :GU#
122  - Parking Management
123  - Star Alignment
124  - Tracking Frequency
125  - Focuser rework
126 
127  Version 1.2: Initial issue
128 
129 */
130 
131 #pragma once
132 
133 #include "lx200generic.h"
134 #include "lx200driver.h"
135 #include "indicom.h"
136 #include "indifocuserinterface.h"
137 #include "indiweatherinterface.h"
138 #include "indirotatorinterface.h"
140 
141 
142 #include <cstring>
143 #include <unistd.h>
144 #include <termios.h>
145 #include <stdlib.h>
146 
147 #define RB_MAX_LEN 64
148 #define CMD_MAX_LEN 32
149 
150 #define PORTS_COUNT 10
151 #define STARTING_PORT 0
152 
154 
156 enum RateCompensation {RC_NONE, RC_REFR_RA, RC_REFR_BOTH, RC_FULL_RA, RC_FULL_BOTH}; //To allow for using one variable instead of two in the future
157 
159 
161 
163 {
164  public:
165  LX200_OnStep();
167 
168  virtual const char *getDefaultName() override;
169  virtual bool initProperties() override;
170  virtual void ISGetProperties(const char *dev) override;
171  virtual bool updateProperties() override;
172  virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override;
173  virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override;
174 
175  protected:
176  virtual void getBasicData() override;
177  virtual bool Park() override;
178  virtual bool UnPark() override;
179  virtual bool SetCurrentPark() override;
180  virtual bool SetDefaultPark() override;
181  virtual bool SetTrackEnabled(bool enabled) override;
182  virtual bool updateLocation(double latitude, double longitude, double elevation) override;
183  virtual bool setLocalDate(uint8_t days, uint8_t months, uint16_t years) override;
184  virtual bool ReadScopeStatus() override;
185  virtual int setSiteLongitude(int fd, double Long);
186  virtual int setSiteLatitude(int fd, double Long);
187  virtual bool SetTrackRate(double raRate, double deRate) override;
188  virtual void slewError(int slewCode) override;
189  virtual bool Sync(double ra, double dec) override;
190 
191  virtual bool saveConfigItems(FILE *fp) override;
192  virtual void Init_Outputs();
193 
194  //Mount information
195  MountType OSMountType = MOUNTTYPE_GEM; //default to GEM
196  /* 0 = EQ mount (Presumed default for most things.)
197  * 1 = Fork
198  * 2 = Fork Alt
199  * 3 = Alt Azm
200  */
201 
202  virtual bool sendScopeTime() override;
203  virtual bool sendScopeLocation() override;
204  virtual bool setUTCOffset(double offset) override; //azwing fix after change in lx200driver.cpp
205 
206  // Goto
207  virtual bool Goto(double ra, double dec) override;
208 
209  //FocuserInterface
210 
211  IPState MoveFocuser(FocusDirection dir, int speed, uint16_t duration) override;
212  IPState MoveAbsFocuser (uint32_t targetTicks) override;
213  IPState MoveRelFocuser (FocusDirection dir, uint32_t ticks) override;
214  bool AbortFocuser () override;
215 
216  //End FocuserInterface
217 
218  //RotatorInterface
219 
220  IPState MoveRotator(double angle) override;
221  // bool SyncRotator(double angle) override;
222  IPState HomeRotator() override;
223  // bool ReverseRotator(bool enabled) override;
224  bool AbortRotator() override;
225  bool SetRotatorBacklash (int32_t steps) override;
226  bool SetRotatorBacklashEnabled(bool enabled) override;
227 
228  //End RotatorInterface
229 
230  //PECInterface
231  //axis 0=RA, 1=DEC, others?
232  IPState StopPECPlayback (int axis);
233  IPState StartPECPlayback (int axis);
234  IPState ClearPECBuffer (int axis);
235  IPState StartPECRecord (int axis);
236  IPState SavePECBuffer (int axis);
237  IPState PECStatus (int axis);
238  IPState ReadPECBuffer (int axis);
239  IPState WritePECBuffer (int axis);
240  bool ISPECRecorded (int axis);
241  bool OSPECEnabled = false;
242  bool OSPECviaGU = false; //Older versions use :QZ# for PEC status, new can use the standard :GU#/:Gu#
243  //End PECInterface
244 
245 
246  //NewGeometricAlignment
247  IPState AlignStartGeometric(int stars);
248 
257  IPState AlignDone();
259  virtual bool UpdateAlignStatus();
260  virtual bool UpdateAlignErr();
261  //End NewGeometricAlignment
262  bool OSAlignCompleted = false;
263 
264  //Outputs
265  IPState OSEnableOutput(int output);
266  IPState OSDisableOutput(int output);
267  bool OSGetOutputState(int output);
268 
269 
270  bool sendOnStepCommand(const char *cmd);
271  bool sendOnStepCommandBlind(const char *cmd);
272  int flushIO(int fd);
273  int getCommandSingleCharResponse(int fd, char *data, const char *cmd); //Reimplemented from getCommandString
274  int getCommandSingleCharErrorOrLongResponse(int fd, char *data, const char *cmd); //Reimplemented from getCommandString
275  int getCommandDoubleResponse(int fd, double *value, char *data,
276  const char *cmd); //Reimplemented from getCommandString Will return a double, and raw value.
277  int getCommandIntResponse(int fd, int *value, char *data, const char *cmd);
278  int setMinElevationLimit(int fd, int min);
279  int OSUpdateFocuser(); //Return = 0 good, -1 = Communication error
280  int OSUpdateRotator(); //Return = 0 good, -1 = Communication error
281 
284 
287 
290 
293 
296 
299 
301  INumber BacklashN[2]; //Test
302 
305 
308 
310 
311  long int OSTimeoutSeconds = 0;
312  long int OSTimeoutMicroSeconds = 100000;
313 
314  // OnStep Status controls
317 
318  bool TMCDrivers = true; //Set to false if it doesn't detect TMC_SPI reporting. (Small delay on connection/first update)
319  bool OSHighPrecision = false;
320 
321  // Focuser controls
322  // Focuser 1
323  bool OSFocuser1 = false;
326 
327  // Focus T° Compensation
336  // End Focus T° Compensation
337 
338  int OSNumFocusers = 0;
341 
342  // Focuser 2
343  //ISwitchVectorProperty OSFocus2SelSP;
344  //ISwitch OSFocus2SelS[2];
345  bool OSFocuser2 = false;
348 
351 
354 
355  //Rotator - Some handled by RotatorInterface, but that's mostly for rotation only, absolute, and... very limited.
356  bool OSRotator1 = false; //Change to false after detection code
358  ISwitch OSRotatorRateS[4]; //Set rate
359 
361  ISwitch OSRotatorDerotateS[2]; //On or Off
362 
363 
364 
365  int IsTracking = 0;
366 
367  // Reticle +/- Buttons
370 
371  // Align Buttons
374 
377 
380 
383 
386 
389 
392 
395 
409  INumber OSPECRWValuesN[2]; //Current Index and User Index
410 
424 
429 
430 
433  bool OSHasOutputs = true;
434 
437 
440 
441 
444 
447  uint8_t PECStatusGU = 0;
448  uint8_t ParkStatusGU = 0;
449 
450  // Weather support
451  // NOTE: Much is handled by WeatherInterface, these controls are mainly for setting values which are not detected
452  // As of right now, if there is a sensor the values will be overwritten on the next update
454  true; //This can fail on some processors and take the timeout before an update, so if it fails, don't check again.
455 
456 
463  //Not sure why this would be used, but will feed to it from site settings
466 
467 
468  //This is updated via other commands, as such I'm going to ignore it like some others do.
469  virtual IPState updateWeather() override
470  {
471  return IPS_OK;
472  }
473 
474 
479  virtual void SyncParkStatus(bool isparked) override;
480 
486  virtual void SetParked(bool isparked) override;
487 
492  // #define DEBUG_TRACKSTATE
493  void PrintTrackState();
494 
495  private:
496  int currentCatalog;
497  int currentSubCatalog;
498 
499 
500 
501 };
Provides interface to implement weather reporting functionality.
bool AbortRotator() override
AbortRotator Abort all motion.
char OldOSStat[RB_MAX_LEN]
Definition: lx200_OnStep.h:439
IPState ClearPECBuffer(int axis)
ISwitch TrackCompS[3]
Definition: lx200_OnStep.h:373
virtual bool Goto(double ra, double dec) override
Move the scope to the supplied RA and DEC coordinates.
INumberVectorProperty BacklashNP
Definition: lx200_OnStep.h:300
ISwitchVectorProperty AutoFlipSP
Definition: lx200_OnStep.h:381
IText OSNAlignT[8]
Definition: lx200_OnStep.h:419
INumberVectorProperty FocuserTNP
Definition: lx200_OnStep.h:328
INumber OSPECCurrentIndexN[2]
Definition: lx200_OnStep.h:405
INumber OSFocus2TargN[1]
Definition: lx200_OnStep.h:353
IPState PECStatus(int axis)
bool OSCpuTemp_good
Definition: lx200_OnStep.h:453
virtual void Init_Outputs()
ITextVectorProperty OnstepStatTP
Definition: lx200_OnStep.h:315
int getCommandSingleCharResponse(int fd, char *data, const char *cmd)
ISwitch OSFocus1InitializeS[4]
Definition: lx200_OnStep.h:325
IPState MoveFocuser(FocusDirection dir, int speed, uint16_t duration) override
MoveFocuser the focuser in a particular direction with a specific speed for a finite duration.
ISwitch ReticS[2]
Definition: lx200_OnStep.h:369
int getCommandDoubleResponse(int fd, double *value, char *data, const char *cmd)
ISwitch OSPECStatusS[5]
Definition: lx200_OnStep.h:397
ISwitchVectorProperty OSRotatorDerotateSP
Definition: lx200_OnStep.h:360
uint8_t PECStatusGU
Definition: lx200_OnStep.h:447
INumber ElevationLimitN[2]
Definition: lx200_OnStep.h:304
int getCommandIntResponse(int fd, int *value, char *data, const char *cmd)
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
OnStepVersion OnStepMountVersion
Definition: lx200_OnStep.h:309
ITextVectorProperty OSNAlignErrTP
Definition: lx200_OnStep.h:422
virtual bool setLocalDate(uint8_t days, uint8_t months, uint16_t years) override
ISwitchVectorProperty OSNAlignStarsSP
Definition: lx200_OnStep.h:411
ISwitchVectorProperty OSOutput1SP
Definition: lx200_OnStep.h:425
INumberVectorProperty GuideRateNP
Definition: lx200_OnStep.h:436
ISwitch TrackAxisS[3]
Definition: lx200_OnStep.h:376
ISwitch PreferredPierSideS[3]
Definition: lx200_OnStep.h:391
IPState AlignDone()
ISwitch OSRotatorDerotateS[2]
Definition: lx200_OnStep.h:361
ISwitchVectorProperty OSNAlignPolarRealignSP
Definition: lx200_OnStep.h:417
INumberVectorProperty ObjectNoNP
Definition: lx200_OnStep.h:294
IPState OSDisableOutput(int output)
INumberVectorProperty minutesPastMeridianNP
Definition: lx200_OnStep.h:393
IText OnstepStat[11]
Definition: lx200_OnStep.h:316
ISwitch OSRotatorRateS[4]
Definition: lx200_OnStep.h:358
INumberVectorProperty OSFocus2TargNP
Definition: lx200_OnStep.h:352
virtual bool setUTCOffset(double offset) override
ISwitch OSFocus2RateS[4]
Definition: lx200_OnStep.h:347
INumber OSPECUserIndexN[2]
Definition: lx200_OnStep.h:407
bool ISPECRecorded(int axis)
IPState OSEnableOutput(int output)
ISwitch OSNAlignWriteS[1]
Definition: lx200_OnStep.h:416
ISwitchVectorProperty PreferredPierSideSP
Definition: lx200_OnStep.h:390
ISwitchVectorProperty OSRotatorRateSP
Definition: lx200_OnStep.h:357
IText VersionT[5]
Definition: lx200_OnStep.h:307
INumber minutesPastMeridianN[2]
Definition: lx200_OnStep.h:394
IPState AlignStartGeometric(int stars)
IPState StartPECPlayback(int axis)
INumber TFCDeadbandN[1]
Definition: lx200_OnStep.h:335
bool SetRotatorBacklash(int32_t steps) override
SetRotatorBacklash Set the Rotatorer backlash compensation value.
virtual bool UnPark() override
Unpark the telescope if already parked.
IPState StopPECPlayback(int axis)
INumberVectorProperty OSSetPressureNP
Definition: lx200_OnStep.h:461
ISwitch OSFocusSelectS[9]
Definition: lx200_OnStep.h:340
ISwitchVectorProperty OSFocus2MotionSP
Definition: lx200_OnStep.h:349
ITextVectorProperty OSNAlignTP
Definition: lx200_OnStep.h:420
IPState SavePECBuffer(int axis)
ISwitchVectorProperty DeepSkyCatalogSP
Definition: lx200_OnStep.h:288
ISwitchVectorProperty OSPECIndexSP
Definition: lx200_OnStep.h:398
ISwitch OSFocus2MotionS[3]
Definition: lx200_OnStep.h:350
bool OSAlignCompleted
Definition: lx200_OnStep.h:262
ISwitch TFCCompensationS[2]
Definition: lx200_OnStep.h:331
INumber OSSetTemperatureN[1]
Definition: lx200_OnStep.h:458
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save parameters ranges in the config file.
ISwitchVectorProperty HomePauseSP
Definition: lx200_OnStep.h:384
ISwitchVectorProperty TFCCompensationSP
Definition: lx200_OnStep.h:330
ISwitch OSOutput1S[2]
Definition: lx200_OnStep.h:426
virtual bool Sync(double ra, double dec) override
Set the telescope current RA and DEC coordinates to the supplied RA and DEC coordinates.
INumberVectorProperty OSSetAltitudeNP
Definition: lx200_OnStep.h:464
virtual void getBasicData() override
virtual bool SetDefaultPark() override
SetDefaultPark Set default coordinates/encoders value as the desired parking position.
ISwitchVectorProperty OSPECStatusSP
Definition: lx200_OnStep.h:396
IPState MoveRelFocuser(FocusDirection dir, uint32_t ticks) override
MoveFocuser the focuser to an relative position.
ISwitchVectorProperty OSPECRecordSP
Definition: lx200_OnStep.h:400
bool sendOnStepCommand(const char *cmd)
int flushIO(int fd)
virtual int setSiteLongitude(int fd, double Long)
long int OSTimeoutMicroSeconds
Definition: lx200_OnStep.h:312
ISwitchVectorProperty OSFocus2RateSP
Definition: lx200_OnStep.h:346
INumber BacklashN[2]
Definition: lx200_OnStep.h:301
uint8_t ParkStatusGU
Definition: lx200_OnStep.h:448
IPState MoveAbsFocuser(uint32_t targetTicks) override
MoveFocuser the focuser to an absolute position.
ISwitch FrequencyAdjustS[3]
Definition: lx200_OnStep.h:379
IPState AlignAddStar()
AlignStartGeometric starts the OnStep Multistar align process.
INumber ObjectNoN[1]
Definition: lx200_OnStep.h:295
virtual bool SetTrackEnabled(bool enabled) override
SetTrackEnabled Engages or disengages mount tracking. If there are no tracking modes available,...
IPState AlignWrite()
IText OSNAlignErrT[4]
Definition: lx200_OnStep.h:421
MountType OSMountType
Definition: lx200_OnStep.h:195
ISwitch OSNAlignPolarRealignS[2]
Definition: lx200_OnStep.h:418
virtual bool initProperties() override
Called to initialize basic properties required all the time.
ISwitchVectorProperty ReticSP
Definition: lx200_OnStep.h:368
char OSPier[RB_MAX_LEN]
Definition: lx200_OnStep.h:442
bool sendOnStepCommandBlind(const char *cmd)
INumber OSSetHumidityN[1]
Definition: lx200_OnStep.h:460
INumber OutputPorts[PORTS_COUNT]
Definition: lx200_OnStep.h:431
INumber OSSetAltitudeN[1]
Definition: lx200_OnStep.h:465
IPState StartPECRecord(int axis)
bool OSSupports_bitfield_Gu
Definition: lx200_OnStep.h:446
virtual int setSiteLatitude(int fd, double Long)
ISwitchVectorProperty OSNAlignWriteSP
Definition: lx200_OnStep.h:415
long int OSTimeoutSeconds
Definition: lx200_OnStep.h:311
virtual void SyncParkStatus(bool isparked) override
SyncParkStatus Update the state and switches for parking.
ISwitchVectorProperty FrequencyAdjustSP
Definition: lx200_OnStep.h:378
INumberVectorProperty TFCCoefficientNP
Definition: lx200_OnStep.h:332
virtual bool sendScopeLocation() override
ISwitchVectorProperty SolarSP
Definition: lx200_OnStep.h:291
char OSNAlignStat[RB_MAX_LEN]
Definition: lx200_OnStep.h:423
INumber OSPECRWValuesN[2]
Definition: lx200_OnStep.h:409
int setMinElevationLimit(int fd, int min)
IPState ReadPECBuffer(int axis)
ISwitchVectorProperty OSFocus1InitializeSP
Definition: lx200_OnStep.h:324
IPState WritePECBuffer(int axis)
ISwitchVectorProperty OSOutput2SP
Definition: lx200_OnStep.h:427
char OldOSPier[RB_MAX_LEN]
Definition: lx200_OnStep.h:443
IPState HomeRotator() override
HomeRotator Go to home position.
ISwitch OSPECReadS[2]
Definition: lx200_OnStep.h:403
virtual bool Park() override
Park the telescope to its home position.
ISwitchVectorProperty StarCatalogSP
Definition: lx200_OnStep.h:285
virtual void slewError(int slewCode) override
ISwitch AutoFlipS[2]
Definition: lx200_OnStep.h:382
bool SetRotatorBacklashEnabled(bool enabled) override
SetRotatorBacklashEnabled Enables or disables the Rotator backlash compensation.
ISwitchVectorProperty OSPECReadSP
Definition: lx200_OnStep.h:402
ISwitchVectorProperty SetHomeSP
Definition: lx200_OnStep.h:387
ISwitch DeepSkyCatalogS[7]
Definition: lx200_OnStep.h:289
ISwitch OSNAlignS[4]
Definition: lx200_OnStep.h:414
char OSStat[RB_MAX_LEN]
Definition: lx200_OnStep.h:438
INumberVectorProperty TFCDeadbandNP
Definition: lx200_OnStep.h:334
ISwitch HomePauseS[3]
Definition: lx200_OnStep.h:385
ISwitchVectorProperty TrackAxisSP
Definition: lx200_OnStep.h:375
INumberVectorProperty ElevationLimitNP
Definition: lx200_OnStep.h:303
INumber MaxSlewRateN[1]
Definition: lx200_OnStep.h:298
int getCommandSingleCharErrorOrLongResponse(int fd, char *data, const char *cmd)
virtual bool UpdateAlignErr()
ISwitch StarCatalogS[3]
Definition: lx200_OnStep.h:286
virtual bool SetTrackRate(double raRate, double deRate) override
SetTrackRate Set custom tracking rates.
ISwitchVectorProperty OSNAlignSP
Definition: lx200_OnStep.h:413
ISwitch OSPECRecordS[3]
Definition: lx200_OnStep.h:401
ISwitch SetHomeS[2]
Definition: lx200_OnStep.h:388
INumberVectorProperty OSSetHumidityNP
Definition: lx200_OnStep.h:459
INumberVectorProperty OSPECCurrentIndexNP
Definition: lx200_OnStep.h:404
ISwitch OSOutput2S[2]
Definition: lx200_OnStep.h:428
virtual bool sendScopeTime() override
ISwitch OSNAlignStarsS[9]
Definition: lx200_OnStep.h:412
ITextVectorProperty VersionTP
Definition: lx200_OnStep.h:306
bool OSGetOutputState(int output)
virtual bool UpdateAlignStatus()
INumber TFCCoefficientN[1]
Definition: lx200_OnStep.h:333
IPState MoveRotator(double angle) override
MoveRotator Go to specific angle.
ISwitchVectorProperty TrackCompSP
Definition: lx200_OnStep.h:372
void PrintTrackState()
PrintTrackState will print to the debug log the status of TrackState if DEBUG_TRACKSTATE is defined o...
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
INumber OSSetPressureN[1]
Definition: lx200_OnStep.h:462
INumberVectorProperty OSPECUserIndexNP
Definition: lx200_OnStep.h:406
bool OSHighPrecision
Definition: lx200_OnStep.h:319
INumberVectorProperty MaxSlewRateNP
Definition: lx200_OnStep.h:297
virtual const char * getDefaultName() override
ISwitchVectorProperty OSFocusSelectSP
Definition: lx200_OnStep.h:339
ITextVectorProperty ObjectInfoTP
Definition: lx200_OnStep.h:282
INumberVectorProperty OSSetTemperatureNP
Definition: lx200_OnStep.h:457
ISwitch SolarS[10]
Definition: lx200_OnStep.h:292
INumber GuideRateN[2]
Definition: lx200_OnStep.h:435
virtual void ISGetProperties(const char *dev) override
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
virtual void SetParked(bool isparked) override
SetParked Change the mount parking status. The data park file (stored in ~/.indi/ParkData....
INumberVectorProperty OutputPorts_NP
Definition: lx200_OnStep.h:432
IText ObjectInfoT[1]
Definition: lx200_OnStep.h:283
virtual IPState updateWeather() override
updateWeather Update weather conditions from device or service. The function should not change the st...
Definition: lx200_OnStep.h:469
INumber FocuserTN[2]
Definition: lx200_OnStep.h:329
INumberVectorProperty OSPECRWValuesNP
Definition: lx200_OnStep.h:408
bool OSSeparate_Pulse_Guide_Rate
Definition: lx200_OnStep.h:445
virtual bool updateLocation(double latitude, double longitude, double elevation) override
Update telescope location settings.
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
virtual bool ReadScopeStatus() override
Read telescope status.
bool AbortFocuser() override
AbortFocuser all focus motion.
ISwitch OSPECIndexS[2]
Definition: lx200_OnStep.h:399
virtual bool SetCurrentPark() override
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
double min(void)
double ra
double dec
ISState
Switch state.
Definition: indiapi.h:150
IPState
Property state.
Definition: indiapi.h:160
@ IPS_OK
Definition: indiapi.h:162
Implementations for common driver routines.
int fd
Definition: intelliscope.c:43
MountType
Definition: lx200_OnStep.h:158
@ MOUNTTYPE_GEM
Definition: lx200_OnStep.h:158
@ MOUNTTYPE_ALTAZ
Definition: lx200_OnStep.h:158
@ MOUNTTYPE_FORK
Definition: lx200_OnStep.h:158
@ MOUNTTYPE_FORK_ALT
Definition: lx200_OnStep.h:158
RateCompensation
Definition: lx200_OnStep.h:156
@ RC_REFR_BOTH
Definition: lx200_OnStep.h:156
@ RC_FULL_BOTH
Definition: lx200_OnStep.h:156
@ RC_NONE
Definition: lx200_OnStep.h:156
@ RC_FULL_RA
Definition: lx200_OnStep.h:156
@ RC_REFR_RA
Definition: lx200_OnStep.h:156
#define RB_MAX_LEN
Definition: lx200_OnStep.h:147
OnStepVersion
Definition: lx200_OnStep.h:160
@ OSV_OnStepV4
Definition: lx200_OnStep.h:160
@ OSV_OnStepV3
Definition: lx200_OnStep.h:160
@ OSV_OnStepV5
Definition: lx200_OnStep.h:160
@ OSV_UNKNOWN
Definition: lx200_OnStep.h:160
@ OSV_OnStepV1or2
Definition: lx200_OnStep.h:160
@ OSV_OnStepX
Definition: lx200_OnStep.h:160
ResponseErrors
Definition: lx200_OnStep.h:153
@ RES_ERR_FORMAT
Definition: lx200_OnStep.h:153
Errors
Definition: lx200_OnStep.h:155
@ ERR_GOTO_ERR_ABOVE_OVERHEAD
Definition: lx200_OnStep.h:155
@ ERR_GOTO_ERR_PARK
Definition: lx200_OnStep.h:155
@ ERR_MERIDIAN
Definition: lx200_OnStep.h:155
@ ERR_GOTO_ERR_OUTSIDE_LIMITS
Definition: lx200_OnStep.h:155
@ ERR_GOTO_ERR_BELOW_HORIZON
Definition: lx200_OnStep.h:155
@ ERR_LIMIT_SENSE
Definition: lx200_OnStep.h:155
@ ERR_DEC
Definition: lx200_OnStep.h:155
@ ERR_NONE
Definition: lx200_OnStep.h:155
@ ERR_GOTO_ERR_GOTO
Definition: lx200_OnStep.h:155
@ ERR_UNDER_POLE
Definition: lx200_OnStep.h:155
@ ERR_ALT_MAX
Definition: lx200_OnStep.h:155
@ ERR_GOTO_ERR_IN_MOTION
Definition: lx200_OnStep.h:155
@ ERR_GOTO_ERR_UNSPECIFIED
Definition: lx200_OnStep.h:155
@ ERR_SYNC
Definition: lx200_OnStep.h:155
@ ERR_ALT_MIN
Definition: lx200_OnStep.h:155
@ ERR_GOTO_ERR_STANDBY
Definition: lx200_OnStep.h:155
@ ERR_AZM
Definition: lx200_OnStep.h:155
@ ERR_UNSPECIFIED
Definition: lx200_OnStep.h:155
@ ERR_PARK
Definition: lx200_OnStep.h:155
@ ERR_GOTO_ERR_NONE
Definition: lx200_OnStep.h:155
@ ERR_GOTO_ERR_HARDWARE_FAULT
Definition: lx200_OnStep.h:155
@ ERR_MOTOR_FAULT
Definition: lx200_OnStep.h:155
@ ERR_GOTO_SYNC
Definition: lx200_OnStep.h:155
#define PORTS_COUNT
Definition: lx200_OnStep.h:150
__u8 cmd[4]
Definition: pwc-ioctl.h:2
One number descriptor.
One switch descriptor.
One text descriptor.
Number vector property descriptor.
Definition: indiapi.h:319
Switch vector property descriptor.
Definition: indiapi.h:367
Text vector property descriptor.
Definition: indiapi.h:246