Instrument Neutral Distributed Interface INDI 2.2.5
lx200pulsar2.h
Go to the documentation of this file.
1/*
2 Pulsar 2 INDI driver
3
4 Copyright (C) 2016, 2017 Jasem Mutlaq and Camiel Severijns
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
27{
28 public:
30 virtual ~LX200Pulsar2() {}
31
32 static constexpr char const *ADVANCED_TAB = "Advanced Setup";
33 static constexpr bool verboseLogging = false;
34 static constexpr char Null = '\0';
35
36
37 virtual const char *getDefaultName() override;
38
39 virtual bool Connect() override;
40 virtual bool Disconnect() override;
41 virtual bool Handshake() override;
42 virtual bool ReadScopeStatus() override;
43 virtual void ISGetProperties(const char *dev) override;
44 virtual bool initProperties() override;
45 virtual bool updateProperties() override;
46 virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override;
47 virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override;
48 virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override;
49
50 static const unsigned int numPulsarTrackingRates = 7;
51
52 protected:
53 virtual bool SetSlewRate(int index) override;
54 virtual bool SetMountType(TelescopeMountType type) override;
55 virtual bool MoveNS(INDI_DIR_NS dir, TelescopeMotionCommand command) override;
56 virtual bool MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command) override;
57 virtual bool Abort() override;
58
59 virtual IPState GuideNorth(uint32_t ms) override;
60 virtual IPState GuideSouth(uint32_t ms) override;
61 virtual IPState GuideEast(uint32_t ms) override;
62 virtual IPState GuideWest(uint32_t ms) override;
63
64 virtual bool updateTime(ln_date *utc, double utc_offset) override;
65 virtual bool updateLocation(double latitude, double longitude, double elevation) override;
66
67 virtual bool Goto(double, double) override;
68 virtual bool Park() override;
69 virtual bool Sync(double ra, double dec) override;
70 virtual bool UnPark() override;
71
72 virtual bool isSlewComplete() override;
73 virtual bool checkConnection() override;
74
75 virtual void getBasicData() override;
76
77
78 // Pier Side
83
84 // Tracking Rates
87
88 // Guide Speed Indicator
91 // Center Speed Indicator
94 // Find Speed Indicator
97 // Slew Speed Indicator
100 // GoTo Speed Indicator
103
104 // Ramp
107
108 // Reduction
111
112 // Maingear
115
116 // Backlash
119
120 // Home Position
123
124 // SwapTubeDelay
127
128 // Periodic error correction on or off
131
132 // Pole crossing on or off
135
136 // Refraction correction on or off
139
140 // Rotation RA
143 // Rotation DEC
146
147 // User1 Rate
150
151
152 // Tracking Current
154 INumber TrackingCurrentN[1]; // only one entry for both RA and Dec
155 // Stop Current
157 INumber StopCurrentN[1]; // only one entry for both RA and Dec
158 // GoTo Current
160 INumber GoToCurrentN[1]; // only one entry for both RA and Dec
161
162 private:
163
164 bool storeScopeLocation();
165 virtual bool sendScopeTime() override;
166
167 bool isSlewing();
168 bool just_started_slewing;
169
170 bool local_properties_updated = false;
171 bool initialization_complete = false; // actually completion of getBasicData
172
173};
int SetSlewRate(void)
TelescopeMountType
Mount geometry reported in the standard TELESCOPE_MOUNT_TYPE property. The values are the indices of ...
static constexpr char const * ADVANCED_TAB
INumber TrackingCurrentN[1]
virtual bool isSlewComplete() override
INumberVectorProperty TrackingCurrentNP
virtual bool initProperties() override
Called to initialize basic properties required all the time.
INumber GoToCurrentN[1]
virtual IPState GuideEast(uint32_t ms) override
Guide east for ms milliseconds. East is defined as RA+.
ISwitch TrackingRateIndS[numPulsarTrackingRates]
ISwitchVectorProperty PoleCrossingSP
INumber GoToSpeedIndN[1]
virtual void getBasicData() override
INumber MaingearN[2]
INumberVectorProperty SlewSpeedIndNP
INumberVectorProperty SwapTubeDelayNP
INumberVectorProperty GoToSpeedIndNP
INumber RampN[2]
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
Process the client newSwitch command.
virtual bool UnPark() override
Unpark the telescope if already parked.
ISwitchVectorProperty PierSideSP
INumber ReductionN[2]
INumber UserRate1N[2]
INumberVectorProperty HomePositionNP
virtual bool Handshake() override
perform handshake with device to check communication
ISwitch RotationDecS[2]
INumberVectorProperty GoToCurrentNP
INumberVectorProperty BacklashNP
ISwitch PoleCrossingS[2]
INumber SlewSpeedIndN[1]
ISwitchVectorProperty RefractionCorrectionSP
INumber FindSpeedIndN[1]
ISwitchVectorProperty RotationDecSP
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual bool Disconnect() override
Disconnect from device.
ISwitchVectorProperty RotationRASP
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
ISwitchVectorProperty PierSideToggleSP
virtual bool updateTime(ln_date *utc, double utc_offset) override
Update telescope time, date, and UTC offset.
INumberVectorProperty GuideSpeedIndNP
virtual bool Abort() override
Abort any telescope motion including tracking if possible.
INumber StopCurrentN[1]
virtual const char * getDefaultName() override
static constexpr char Null
INumber BacklashN[2]
INumberVectorProperty ReductionNP
INumberVectorProperty RampNP
virtual ~LX200Pulsar2()
virtual IPState GuideWest(uint32_t ms) override
Guide west for ms milliseconds. West is defined as RA-.
ISwitch RefractionCorrectionS[2]
ISwitchVectorProperty TrackingRateIndSP
virtual bool Goto(double, double) override
Move the scope to the supplied RA and DEC coordinates.
virtual bool MoveNS(INDI_DIR_NS dir, TelescopeMotionCommand command) override
Start or Stop the telescope motion in the direction dir.
ISwitch PeriodicErrorCorrectionS[2]
INumber GuideSpeedIndN[1]
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...
INumberVectorProperty UserRate1NP
INumber HomePositionN[2]
INumber CenterSpeedIndN[1]
virtual bool checkConnection() override
INumberVectorProperty StopCurrentNP
virtual bool Park() override
Park the telescope to its home position.
static constexpr bool verboseLogging
virtual bool MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command) override
Move the telescope in the direction dir.
INumberVectorProperty FindSpeedIndNP
ISwitch PierSideToggleS[1]
virtual bool Sync(double ra, double dec) override
Set the telescope current RA and DEC coordinates to the supplied RA and DEC coordinates.
virtual bool ReadScopeStatus() override
Read telescope status.
static const unsigned int numPulsarTrackingRates
virtual bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
virtual IPState GuideSouth(uint32_t ms) override
Guide south for ms milliseconds. South is defined as DEC-.
INumberVectorProperty CenterSpeedIndNP
ISwitch RotationRAS[2]
ISwitchVectorProperty PeriodicErrorCorrectionSP
INumber SwapTubeDelayN[1]
ISwitch PierSideS[2]
virtual bool SetMountType(TelescopeMountType type) override
SetMountType Called when the user selects a different mount type in TELESCOPE_MOUNT_TYPE....
INumberVectorProperty MaingearNP
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
virtual bool updateLocation(double latitude, double longitude, double elevation) override
Update telescope location settings.
virtual IPState GuideNorth(uint32_t ms) override
Guide north for ms milliseconds. North is defined as DEC+.
virtual bool sendScopeTime()
double ra
double dec
ISState
Switch state.
Definition indiapi.h:148
IPState
Property state.
Definition indiapi.h:158
struct _ISwitchVectorProperty ISwitchVectorProperty
struct _INumberVectorProperty INumberVectorProperty
INDI_DIR_WE
INDI_DIR_NS
*brief user defined string literal for JSON values *sa std::size_t n
uint16_t type
Definition pwc-ioctl.h:0
One number descriptor.
One switch descriptor.