1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
/*
INDI Developers Manual
Tutorial #2
"Simple Telescope Driver"
We develop a simple telescope simulator.
Refer to README, which contains instruction on how to build this driver, and use it
with an INDI-compatible client.
*/
/** \file simplescope.h
\brief Construct a basic INDI telescope device that simulates GOTO commands.
\author Jasem Mutlaq
\example simplescope.h
A simple GOTO telescope that simulator slewing operation.
*/
#pragma once
#include "inditelescope.h"
class SimpleScope : public INDI::Telescope
{
public:
SimpleScope();
protected:
bool Handshake() override;
const char *getDefaultName() override;
bool initProperties() override;
// Telescope specific functions
bool ReadScopeStatus() override;
bool Goto(double, double) override;
bool Abort() override;
private:
double currentRA {0};
double currentDEC {90};
double targetRA {0};
double targetDEC {0};
// Debug channel to write mount logs to
// Default INDI::Logger debugging/logging channel are Message, Warn, Error, and Debug
// Since scope information can be _very_ verbose, we create another channel SCOPE specifically
// for extra debug logs. This way the user can turn it on/off as desired.
uint8_t DBG_SCOPE { INDI::Logger::DBG_IGNORE };
// slew rate, degrees/s
static const uint8_t SLEW_RATE = 3;
};
|