Instrument Neutral Distributed Interface INDI  2.0.2
lx200fs2.h
Go to the documentation of this file.
1 /*
2  Astro-Electronic FS-2
3  Copyright (C) 2015 Jasem Mutlaq (mutlaqja@ikarustech.com)
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19 
20 #pragma once
21 
22 #include "lx200generic.h"
24 
25 class LX200FS2 : public LX200Generic
26 {
27  public:
28  LX200FS2();
29 
30  virtual bool initProperties() override;
31  virtual bool updateProperties() override;
32  virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override;
33  virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override;
34 
35  protected:
36  virtual const char *getDefaultName() override;
37  virtual bool isSlewComplete() override;
38  virtual bool checkConnection() override;
39 
40  virtual bool saveConfigItems(FILE *fp) override;
41 
42  // Parking
43  virtual bool Park() override;
44  virtual bool UnPark() override;
45  virtual bool SetCurrentPark() override;
46  virtual bool SetDefaultPark() override;
47 
48  // StopAfterPark
49  virtual bool ReadScopeStatus() override;
50  void TrackingStart();
52  void TrackingStop();
53  void TrackingStop_Abort();
54  void TrackingStop_AllStop();
55 
56  // Fake Location
57  virtual bool updateLocation(double latitude, double longitude, double elevation) override;
58 
61 
65  enum TelescopeSlewRate savedSlewRateIndex {SLEW_MAX};
67  {
74 };
virtual bool SetCurrentPark() override
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
Definition: lx200fs2.cpp:343
void TrackingStart_RestoreSlewRate()
Definition: lx200fs2.cpp:243
enum LX200FS2::TelescopeParkedStatus ParkedStatus
TelescopeParkedStatus
Definition: lx200fs2.h:67
@ PARKED_STOPPED
Definition: lx200fs2.h:71
@ UNPARKED_NEEDSLEW
Definition: lx200fs2.h:72
@ PARKED_NEEDSTOP
Definition: lx200fs2.h:70
@ PARKED_NOTPARKED
Definition: lx200fs2.h:68
@ PARKED_NEEDABORT
Definition: lx200fs2.h:69
INumberVectorProperty SlewAccuracyNP
Definition: lx200fs2.h:60
void TrackingStart()
Definition: lx200fs2.cpp:234
void TrackingStop_Abort()
Definition: lx200fs2.cpp:218
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
Definition: lx200fs2.cpp:55
INumber SlewAccuracyN[2]
Definition: lx200fs2.h:59
virtual bool SetDefaultPark() override
SetDefaultPark Set default coordinates/encoders value as the desired parking position.
Definition: lx200fs2.cpp:359
LX200FS2()
Definition: lx200fs2.cpp:29
virtual bool initProperties() override
Called to initialize basic properties required all the time.
Definition: lx200fs2.cpp:37
virtual bool Park() override
Park the telescope to its home position.
Definition: lx200fs2.cpp:177
virtual bool checkConnection() override
Definition: lx200fs2.cpp:162
void TrackingStop()
Definition: lx200fs2.cpp:207
bool MotorsParked
Definition: lx200fs2.h:64
virtual bool ReadScopeStatus() override
Read telescope status.
Definition: lx200fs2.cpp:252
ISwitchVectorProperty StopAfterParkSP
Definition: lx200fs2.h:62
virtual bool updateLocation(double latitude, double longitude, double elevation) override
Update telescope location settings.
Definition: lx200fs2.cpp:370
virtual bool UnPark() override
Unpark the telescope if already parked.
Definition: lx200fs2.cpp:311
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
Definition: lx200fs2.cpp:119
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
Definition: lx200fs2.cpp:97
virtual const char * getDefaultName() override
Definition: lx200fs2.cpp:150
virtual bool isSlewComplete() override
Definition: lx200fs2.cpp:155
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
Definition: lx200fs2.cpp:167
void TrackingStop_AllStop()
Definition: lx200fs2.cpp:226
ISwitch StopAfterParkS[2]
Definition: lx200fs2.h:63
ISState
Switch state.
Definition: indiapi.h:150
One number descriptor.
One switch descriptor.
Number vector property descriptor.
Definition: indiapi.h:319
Switch vector property descriptor.
Definition: indiapi.h:367