Instrument Neutral Distributed Interface INDI 2.2.5
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
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 ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override;
35
36 protected:
37 virtual const char *getDefaultName() override;
38
39 virtual void getBasicData() override;
40 virtual bool checkConnection() override;
41 virtual bool isSlewComplete() override;
42
43 virtual bool ReadScopeStatus() override;
44
45 virtual bool SetSlewRate(int index) override;
46 virtual bool SetTrackMode(uint8_t mode) override;
47 virtual bool Goto(double, double) override;
48 virtual bool Sync(double, double) override;
49 virtual bool updateTime(ln_date *utc, double utc_offset) override;
50 virtual bool updateLocation(double latitude, double longitude, double elevation) override;
51 virtual bool MoveNS(INDI_DIR_NS dir, TelescopeMotionCommand command) override;
52 virtual bool MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command) override;
53
54 // Parking
55 virtual bool SetCurrentPark() override;
56 virtual bool SetDefaultPark() override;
57 virtual bool Park() override;
58 virtual bool UnPark() override;
59
60 // Time
61 virtual bool setUTCOffset(double offset) override;
62
63 virtual int SendPulseCmd(int8_t direction, uint32_t duration_msec) override;
64
65 // Home
66 virtual IPState ExecuteHomeAction(TelescopeHomeAction action) override;
67
68 private:
69 int setZEQ25StandardProcedure(int fd, const char *data);
70 int setZEQ25Latitude(double Lat);
71 int setZEQ25Longitude(double Long);
72 int setZEQ25UTCOffset(double hours);
73 int setZEQ25Date(int days, int months, int years);
74 int setZEQ25ObjectRA(int fd, double ra);
75 int setZEQ25ObjectDEC(int fd, double dec);
76 bool slewZEQ25();
77 int moveZEQ25To(int direction);
78 int haltZEQ25Movement();
79 int getZEQ25MoveRate();
80 int setZEQ25Park();
81 int setZEQ25UnPark();
82 int setZEQ25TrackMode(int mode);
83 int getZEQ25GuideRate(double *rate);
84 int setZEQ25GuideRate(double rate);
85 bool getZEQ25PierSide(TelescopePierSide &side);
86
87 bool isZEQ25Home();
88 int gotoZEQ25Home();
89
90 bool isZEQ25Parked();
91
92 bool getMountInfo();
93 void mountSim();
94
95 /* Guide Rate */
96 INumber GuideRateN[1];
97 INumberVectorProperty GuideRateNP;
98};
int SetSlewRate(void)
virtual IPState ExecuteHomeAction(TelescopeHomeAction action) override
Execute a homing action.
virtual bool updateTime(ln_date *utc, double utc_offset) override
Update telescope time, date, and UTC offset.
virtual const char * getDefaultName() override
virtual bool MoveNS(INDI_DIR_NS dir, TelescopeMotionCommand command) override
Start or Stop the telescope motion in the direction dir.
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.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual bool MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command) override
Move the telescope in the direction dir.
virtual void getBasicData() override
virtual bool initProperties() override
Called to initialize basic properties required all the time.
virtual bool Park() override
Park the telescope to its home position.
virtual bool checkConnection() override
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.
virtual bool Goto(double, double) override
Move the scope to the supplied RA and DEC coordinates.
virtual bool Sync(double, double) override
Set the telescope current RA and DEC coordinates to the supplied RA and DEC coordinates.
virtual bool UnPark() override
Unpark the telescope if already parked.
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
virtual bool SetTrackMode(uint8_t mode) override
SetTrackMode Set active tracking mode. Do not change track state.
virtual ~LX200ZEQ25() override=default
virtual bool SetDefaultPark() override
SetDefaultPark Set default coordinates/encoders value as the desired parking position.
virtual bool isSlewComplete() override
double ra
double dec
IPState
Property state.
Definition indiapi.h:158
INDI_DIR_WE
INDI_DIR_NS
int fd
One number descriptor.
Number vector property descriptor.
Definition indiapi.h:317