Instrument Neutral Distributed Interface INDI 2.2.5
lx200basic.h
Go to the documentation of this file.
1/*
2 LX200 Basic Driver
3 Copyright (C) 2005 Jasem Mutlaq ([email protected])
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
21#pragma once
22
23#include "inditelescope.h"
24
26{
27 public:
28 LX200Basic();
29 ~LX200Basic() override = default;
30
31 virtual const char *getDefaultName() override;
32 virtual bool Handshake() override;
33 virtual bool ReadScopeStatus() override;
34 virtual bool initProperties() override;
35 virtual bool updateProperties() override;
36 virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override;
37
38 protected:
39 virtual bool Abort() override;
40 virtual bool Goto(double, double) override;
41 virtual bool Sync(double ra, double dec) override;
42
43 virtual void debugTriggered(bool enable) override;
44 virtual bool saveConfigItems(FILE *fp) override;
45
46 void getBasicData();
47
48 protected:
49 bool isSlewComplete();
50 void slewError(int slewCode);
51 void mountSim();
52
55
56 double targetRA = 0, targetDEC = 0;
57 double currentRA = 0, currentDEC = 0;
58 uint32_t DBG_SCOPE = 0;
59};
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
~LX200Basic() override=default
bool isSlewComplete()
void getBasicData()
virtual bool Handshake() override
perform handshake with device to check communication
double currentRA
Definition lx200basic.h:57
double currentDEC
Definition lx200basic.h:57
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
double targetRA
Definition lx200basic.h:56
virtual const char * getDefaultName() override
INumber SlewAccuracyN[2]
Definition lx200basic.h:53
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual bool Sync(double ra, double dec) override
Set the telescope current RA and DEC coordinates to the supplied RA and DEC coordinates.
void slewError(int slewCode)
virtual bool Abort() override
Abort any telescope motion including tracking if possible.
uint32_t DBG_SCOPE
Definition lx200basic.h:58
double targetDEC
Definition lx200basic.h:56
virtual bool Goto(double, double) override
Move the scope to the supplied RA and DEC coordinates.
virtual void debugTriggered(bool enable) override
Inform driver that the debug option was triggered. This function is called after setDebug is triggere...
INumberVectorProperty SlewAccuracyNP
Definition lx200basic.h:54
virtual bool ReadScopeStatus() override
Read telescope status.
void mountSim()
virtual bool initProperties() override
Called to initialize basic properties required all the time.
double ra
double dec
One number descriptor.
Number vector property descriptor.
Definition indiapi.h:317