46 bool updateLocation(
double latitude,
double longitude,
double elevation)
override;
47 bool updateTime(ln_date *utc,
double utc_offset)
override;
50 bool Goto(
double ra,
double dec)
override;
51 bool Sync(
double ra,
double dec)
override;
52 bool Abort()
override;
72 bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override;
73 bool ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
override;
81 bool mxhdQueryRaDec(
double &raHours,
double &decDeg);
82 bool mxhdSetTargetRaDec(
double raHours,
double decDeg);
83 bool mxhdApplyCachedSiteTime();
84 bool mxhdApplySiteCoordinates(
double latitudeDeg,
double longitudeDeg);
85 bool mxhdApplyTime(ln_date *utc,
double utcOffsetHoursEast);
86 bool mxhdSendUtcOffset(
double utcOffsetHoursEast,
int timeoutMs = 10000);
87 bool mxhdSendLocalDateTime(ln_date *utc,
double utcOffsetHoursEast,
int timeoutMs = 10000);
88 void mxhdUpdatePierSide(
double raHours);
90 bool mxhdSend(
const std::string &
cmd);
91 bool mxhdQueryHash(
const std::string &
cmd, std::string &resp);
92 bool mxhdQueryAck(
const std::string &
cmd,
char &ack,
int timeoutMs = 2000);
93 bool mxhdReadStatus(uint8_t &b1, uint8_t &b2, uint8_t &b3);
96 enum class TrackRateMode
103 bool mxhdSetTrackRate(TrackRateMode mode);
106 void decodeStatus(uint8_t b1, uint8_t b2, uint8_t b3);
109 void maybeAdvanceAbortFinalize();
110 void startAbortFinalize(uint32_t delaySeconds);
119 IPState startTimedGuidePulse(GuideAxis axis,
int direction, uint32_t ms,
const char *moveCmd);
120 void completeTimedGuidePulse(GuideAxis axis, uint64_t token,
bool sendStop);
121 void setGuidePropertyIdle(GuideAxis axis,
IPState state);
125 std::mutex m_ioMutex;
126 std::mutex m_siteTimeMutex;
129 uint8_t m_st1 {0}, m_st2 {0}, m_st3 {0};
130 bool m_isHoming {
false};
131 bool m_isSlewing {
false};
132 double m_voltageV {0.0};
133 bool m_parkCommandActive {
false};
134 bool m_unparkCommandActive {
false};
135 bool m_homeCommandActive {
false};
138 bool m_trackingEnabled {
true};
139 TrackRateMode m_trackRateMode {TrackRateMode::Sidereal};
142 bool m_hasCachedSiteCoordinates {
false};
143 bool m_hasCachedTime {
false};
144 double m_cachedSiteLatitudeDeg {0.0};
145 double m_cachedSiteLongitudeDeg {0.0};
146 ln_date m_cachedUtcDate {};
147 double m_cachedUtcOffsetHoursEast {0.0};
148 bool m_hasPierSideCache {
false};
149 bool m_pierSideEast {
false};
152 bool m_abortFinalizeActive {
false};
153 time_t m_abortRequestedAt {0};
154 uint32_t m_abortDelaySeconds {0};
155 bool m_abortSawHomeCleared {
false};
156 time_t m_abortHomeClearedAt {0};
159 std::mutex m_guideMutex;
160 std::atomic<uint64_t> m_guideTokenGen {0};
161 bool m_guideActive {
false};
162 GuideAxis m_guideAxis {GuideAxis::RA};
163 int m_guideDirection {0};
void TimerHit() override
Called when setTimer() time is up.
IPState GuideWest(uint32_t ms)
bool Disconnect() override
Disconnect from device.
bool ReadScopeStatus() override
Read telescope status.
IPState GuideNorth(uint32_t ms)
bool Sync(double ra, double dec) override
Set the telescope current RA and DEC coordinates to the supplied RA and DEC coordinates.
bool updateLocation(double latitude, double longitude, double elevation) override
Update telescope location settings.
bool SetTrackMode(uint8_t mode) override
SetTrackMode Set active tracking mode. Do not change track state.
IPState GuideSouth(uint32_t ms)
bool Abort() override
Abort any telescope motion including tracking if possible.
bool Handshake() override
perform handshake with device to check communication
bool initProperties() override
Called to initialize basic properties required all the time.
bool updateTime(ln_date *utc, double utc_offset) override
Update telescope time, date, and UTC offset.
bool Park() override
Park the telescope to its home position.
const char * getDefaultName() override
bool MoveNS(INDI_DIR_NS dir, TelescopeMotionCommand command) override
Start or Stop the telescope motion in the direction dir.
IPState GuideEast(uint32_t ms)
bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
bool SetTrackEnabled(bool enabled) override
SetTrackEnabled Engages or disengages mount tracking. If there are no tracking modes available,...
bool MoveWE(INDI_DIR_WE dir, TelescopeMotionCommand command) override
Move the telescope in the direction dir.
bool updateProperties() override
Called when connected state changes, to add/remove properties.
bool Goto(double ra, double dec) override
Move the scope to the supplied RA and DEC coordinates.
bool Connect() override
Connect to the device. INDI::DefaultDevice implementation connects to appropriate connection interfac...
~MXHDTelescope() override=default
bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
bool UnPark() override
Unpark the telescope if already parked.
Implementations for common driver routines.
Number vector property descriptor.
Switch vector property descriptor.