Instrument Neutral Distributed Interface INDI  2.0.2
lx200zeq25.h
Go to the documentation of this file.
1 /*
2  ZEQ25 INDI driver
3 
4  Copyright (C) 2015 Jasem Mutlaq
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with this library; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
21 #pragma once
22 
23 #include "lx200generic.h"
24 
25 class LX200ZEQ25 : public LX200Generic
26 {
27  public:
28  LX200ZEQ25();
29  virtual ~LX200ZEQ25() override = default;
30 
31  virtual bool updateProperties() override;
32  virtual bool initProperties() override;
33 
34  virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override;
35  virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override;
36 
37  protected:
38  virtual const char *getDefaultName() override;
39 
40  virtual void getBasicData() override;
41  virtual bool checkConnection() override;
42  virtual bool isSlewComplete() override;
43 
44  virtual bool ReadScopeStatus() override;
45 
46  virtual bool SetSlewRate(int index) override;
47  virtual bool SetTrackMode(uint8_t mode) override;
48  virtual bool Goto(double, double) override;
49  virtual bool Sync(double, double) override;
50  virtual bool updateTime(ln_date *utc, double utc_offset) override;
51  virtual bool updateLocation(double latitude, double longitude, double elevation) override;
52  virtual bool MoveNS(INDI_DIR_NS dir, TelescopeMotionCommand command) override;
53  virtual bool MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command) override;
54 
55  // Parking
56  virtual bool SetCurrentPark() override;
57  virtual bool SetDefaultPark() override;
58  virtual bool Park() override;
59  virtual bool UnPark() override;
60 
61  // Time
62  virtual bool setUTCOffset(double offset) override;
63 
64  virtual int SendPulseCmd(int8_t direction, uint32_t duration_msec) override;
65 
66  private:
67  int setZEQ25StandardProcedure(int fd, const char *data);
68  int setZEQ25Latitude(double Lat);
69  int setZEQ25Longitude(double Long);
70  int setZEQ25UTCOffset(double hours);
71  int setZEQ25Date(int days, int months, int years);
72  bool slewZEQ25();
73  int moveZEQ25To(int direction);
74  int haltZEQ25Movement();
75  int getZEQ25MoveRate();
76  int setZEQ25Park();
77  int setZEQ25UnPark();
78  int setZEQ25TrackMode(int mode);
79  int getZEQ25GuideRate(double *rate);
80  int setZEQ25GuideRate(double rate);
81  bool getZEQ25PierSide(TelescopePierSide &side);
82 
83  bool isZEQ25Home();
84  int gotoZEQ25Home();
85 
86  bool isZEQ25Parked();
87 
88  bool getMountInfo();
89  void mountSim();
90 
91  ISwitch HomeS[1];
92  ISwitchVectorProperty HomeSP;
93 
94  /* Guide Rate */
95  INumber GuideRateN[1];
96  INumberVectorProperty GuideRateNP;
97 };
virtual bool updateTime(ln_date *utc, double utc_offset) override
Update telescope time, date, and UTC offset.
Definition: lx200zeq25.cpp:621
virtual const char * getDefaultName() override
Definition: lx200zeq25.cpp:106
virtual bool MoveNS(INDI_DIR_NS dir, TelescopeMotionCommand command) override
Start or Stop the telescope motion in the direction dir.
Definition: lx200zeq25.cpp:787
virtual int SendPulseCmd(int8_t direction, uint32_t duration_msec) override
virtual bool SetCurrentPark() override
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
Definition: lx200zeq25.cpp:985
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
Definition: lx200zeq25.cpp:195
virtual bool MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command) override
Move the telescope in the direction dir.
Definition: lx200zeq25.cpp:819
virtual bool SetSlewRate(int index) override
SetSlewRate Set desired slew rate index.
Definition: lx200zeq25.cpp:529
virtual void getBasicData() override
Definition: lx200zeq25.cpp:352
virtual bool initProperties() override
Called to initialize basic properties required all the time.
Definition: lx200zeq25.cpp:54
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
Definition: lx200zeq25.cpp:159
virtual bool Park() override
Park the telescope to its home position.
virtual bool checkConnection() override
Definition: lx200zeq25.cpp:111
virtual bool setUTCOffset(double offset) override
virtual bool ReadScopeStatus() override
Read telescope status.
virtual bool updateLocation(double latitude, double longitude, double elevation) override
Update telescope location settings.
Definition: lx200zeq25.cpp:656
virtual bool Goto(double, double) override
Move the scope to the supplied RA and DEC coordinates.
Definition: lx200zeq25.cpp:435
virtual bool Sync(double, double) override
Set the telescope current RA and DEC coordinates to the supplied RA and DEC coordinates.
Definition: lx200zeq25.cpp:407
virtual bool UnPark() override
Unpark the telescope if already parked.
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
Definition: lx200zeq25.cpp:87
virtual bool SetTrackMode(uint8_t mode) override
SetTrackMode Set active tracking mode. Do not change track state.
Definition: lx200zeq25.cpp:894
virtual ~LX200ZEQ25() override=default
virtual bool SetDefaultPark() override
SetDefaultPark Set default coordinates/encoders value as the desired parking position.
virtual bool isSlewComplete() override
Definition: lx200zeq25.cpp:253
ISState
Switch state.
Definition: indiapi.h:150
INDI_DIR_WE
Definition: indibasetypes.h:55
INDI_DIR_NS
Definition: indibasetypes.h:48
int fd
Definition: intelliscope.c:43
One number descriptor.
One switch descriptor.
Number vector property descriptor.
Definition: indiapi.h:319
Switch vector property descriptor.
Definition: indiapi.h:367