Instrument Neutral Distributed Interface INDI  1.9.5
simplescope.h
Go to the documentation of this file.
1 /*
2  INDI Developers Manual
3  Tutorial #2
4 
5  "Simple Telescope Driver"
6 
7  We develop a simple telescope simulator.
8 
9  Refer to README, which contains instruction on how to build this driver, and use it
10  with an INDI-compatible client.
11 
12 */
13 
22 #pragma once
23 
24 #include "inditelescope.h"
25 
27 {
28 public:
29  SimpleScope();
30 
31 protected:
32  bool Handshake() override;
33 
34  const char *getDefaultName() override;
35  bool initProperties() override;
36 
37  // Telescope specific functions
38  bool ReadScopeStatus() override;
39  bool Goto(double, double) override;
40  bool Abort() override;
41 
42 private:
43  double currentRA {0};
44  double currentDEC {90};
45  double targetRA {0};
46  double targetDEC {0};
47 
48  // Debug channel to write mount logs to
49  // Default INDI::Logger debugging/logging channel are Message, Warn, Error, and Debug
50  // Since scope information can be _very_ verbose, we create another channel SCOPE specifically
51  // for extra debug logs. This way the user can turn it on/off as desired.
52  uint8_t DBG_SCOPE { INDI::Logger::DBG_IGNORE };
53 
54  // slew rate, degrees/s
55  static const uint8_t SLEW_RATE = 3;
56 };
SimpleScope::SimpleScope
SimpleScope()
Definition: simplescope.cpp:31
SimpleScope::Handshake
bool Handshake() override
perform handshake with device to check communication
Definition: simplescope.cpp:61
SimpleScope::Goto
bool Goto(double, double) override
Move the scope to the supplied RA and DEC coordinates.
Definition: simplescope.cpp:79
SimpleScope::Abort
bool Abort() override
Abort any telescope motion including tracking if possible.
Definition: simplescope.cpp:102
inditelescope.h
INDI::Telescope
Definition: inditelescope.h:70
SimpleScope::ReadScopeStatus
bool ReadScopeStatus() override
Read telescope status.
Definition: simplescope.cpp:110
SimpleScope::getDefaultName
const char * getDefaultName() override
Definition: simplescope.cpp:71
SimpleScope::initProperties
bool initProperties() override
Called to initialize basic properties required all the time.
Definition: simplescope.cpp:40
INDI::Logger::DBG_IGNORE
@ DBG_IGNORE
Definition: indilogger.h:191
SimpleScope
Definition: simplescope.h:26