39 virtual bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override;
40 virtual bool ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
override;
56 virtual bool updateLocation(
double latitude,
double longitude,
double elevation)
override;
58 virtual bool setLocalDate(uint8_t days, uint8_t months, uint16_t years)
override;
61 virtual bool Park()
override;
62 virtual bool UnPark()
override;
88 bool sendCommand(
const char *
cmd,
char * res =
nullptr,
int cmd_len = -1,
int res_len = -1);
96 bool sendStatusCommand(
const char *
cmd,
char * res);
97 void hexDump(
char * buf,
const char * data,
int size);
98 std::vector<std::string> split(
const std::string &input,
const std::string ®ex);
185 void getFirmwareInfo();
186 bool hasMountPark()
const
188 return m_FirmwareVersion >= FIRMWARE_MOUNT_PARK;
190 bool hasCustomParkPosition()
const
192 return m_FirmwareVersion >= FIRMWARE_CUSTOM_PARK_POSITION;
196 bool parkToMountPosition();
197 bool getMountParkState(
char &state);
198 void checkMountParkState();
199 void updateMountPark(
bool slewComplete);
200 void failMountPark(
const char *reason);
203 bool setAltitudeLimitEnabled(
bool enable);
204 bool getAltitudeLimitStatus();
205 bool setAltitudeLimitUpper(
double limit);
206 bool getAltitudeLimitUpper();
207 bool setAltitudeLimitLower(
double limit);
208 bool getAltitudeLimitLower();
211 bool clearMultiStarAlignmentData();
214 bool setVariableSlewRate(
double rate);
217 bool setGuideRate(
double value);
222 bool setBuzzer(
int value);
225 bool getHeavyDutyMode();
226 bool setHeavyDutyMode(
bool enable);
229 bool setMountType(
int type);
237 bool setMeridianFlipSettings(
bool enabled,
bool track,
double limit);
238 bool getMeridianFlipSettings();
245 static const char DRIVER_STOP_CHAR { 0x23 };
247 static constexpr const uint8_t DRIVER_TIMEOUT {3};
249 static constexpr const uint8_t DRIVER_LEN {64};
251 static constexpr const uint8_t SLEW_MODES {10};
252 static constexpr const char * MERIDIAN_FLIP_TAB {
"Meridian Flip"};
253 static constexpr const char * ALTITUDE_LIMIT_TAB {
"Altitude Limits"};
254 static constexpr const char * ALIGNMENT_TAB {
"Alignment"};
258 static constexpr uint32_t FIRMWARE_MOUNT_PARK {0x010109};
260 static constexpr uint32_t FIRMWARE_CUSTOM_PARK_POSITION {0x010300};
262 static constexpr std::chrono::seconds PARK_START_TIMEOUT {5};
264 uint32_t m_FirmwareVersion {0};
267 bool m_MountParking {
false};
268 bool m_ParkMoved {
false};
269 std::chrono::steady_clock::time_point m_ParkDeadline;
virtual bool ReadScopeStatus() override
Read telescope status.
virtual IPState ExecuteHomeAction(TelescopeHomeAction action) override
Execute a homing action.
virtual bool updateProperties() override
Called when connected state changes, to add/remove properties.
virtual bool SetDefaultPark() override
virtual bool SetTrackEnabled(bool enabled) override
SetTrackEnabled Engages or disengages mount tracking. If there are no tracking modes available,...
virtual bool initProperties() override
Called to initialize basic properties required all the time.
virtual bool Park() override
Park the telescope to its home position.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual const char * getDefaultName() override
virtual bool UnPark() override
Unpark the telescope if already parked.
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Save specific properties in the provide config file handler. Child class usually over...
virtual bool checkConnection() override
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual ~LX200AM5() override=default
virtual bool updateLocation(double latitude, double longitude, double elevation) override
Update telescope location settings.
virtual bool setUTCOffset(double offset) override
virtual bool SetCurrentPark() override
SetCurrentPark Set current coordinates/encoders value as the desired parking position.
virtual bool setLocalDate(uint8_t days, uint8_t months, uint16_t years) override