38 #define LYNXFOCUS_MAX_RETRIES 1
39 #define LYNXFOCUS_TIMEOUT 3
40 #define LYNXFOCUS_MAXBUF 16
41 #define LYNXFOCUS_TEMPERATURE_FREQ 20
42 #define LYNXFOCUS_POSITION_THRESHOLD 5
44 #define FOCUS_SETTINGS_TAB "Settings"
45 #define FOCUS_STATUS_TAB "Status"
46 #define HUB_SETTINGS_TAB "Device"
90 virtual bool loadConfig(
bool silent,
const char *property)
override;
92 virtual bool ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
override;
93 virtual bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override;
94 virtual bool ISNewText(
const char *dev,
const char *name,
char *texts[],
char *names[],
int n)
override;
101 virtual int getVersion(
int *major,
int *minor,
int *sub);
138 uint32_t simPosition;
139 uint32_t targetPosition;
142 bool simCompensationOn;
145 std::map<std::string, std::string> lynxModels;
147 struct timeval focusMoveStart;
148 float focusMoveRequest;
151 bool getFocusConfig();
152 bool getFocusStatus();
158 bool setStepSize(uint16_t stepsize);
161 bool setTemperatureCompensation(
bool enable);
162 bool setTemperatureCompensationMode(
char mode);
163 bool setTemperatureCompensationCoeff(
char mode, int16_t coeff);
164 bool setTemperatureInceptions(
char mode, int32_t inter);
165 bool setTemperatureCompensationOnStart(
bool enable);
173 bool setLedLevel(
int level);
176 bool setDeviceNickname(
const char *nickname);
180 float calcTimeLeft(timeval,
float);
189 ISwitch TemperatureCompensateS[2];
193 ISwitch TemperatureCompensateOnStartS[2];
197 ISwitch TemperatureCompensateModeS[5];
225 IText HFocusNameT[1] {};
231 bool m_HomeOnStart {
false};
233 static const uint8_t LYNX_MAX { 64 };
virtual bool ISNewText(const char *dev, const char *name, char *texts[], char *names[], int n) override
Process the client newSwitch command.
INumberVectorProperty LedNP
virtual int getVersion(int *major, int *minor, int *sub)
virtual const char * getDefaultName() override
virtual void ISGetProperties(const char *dev) override
define the driver's properties to the client. Usually, only a minimum set of properties are defined t...
virtual bool AbortFocuser() override
AbortFocuser all focus motion.
ISwitchVectorProperty ModelSP
virtual void TimerHit() override
Callback function to be called once SetTimer duration elapses.
virtual bool ReverseFocuser(bool enabled) override
ReverseFocuser Reverse focuser motion direction.
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual void debugTriggered(bool enable) override
Inform driver that the debug option was triggered. This function is called after setDebug is triggere...
bool configurationComplete
virtual IPState MoveRelFocuser(FocusDirection dir, uint32_t ticks) override
MoveFocuser the focuser to an relative position.
bool setDeviceType(int index)
virtual bool SyncFocuser(uint32_t ticks) override
SyncFocuser Set current position to ticks without moving the focuser.
virtual bool SetFocuserBacklash(int32_t steps) override
SetFocuserBacklash Set the focuser backlash compensation value.
virtual IPState MoveAbsFocuser(uint32_t targetPosition) override
MoveFocuser the focuser to an absolute position.
void setFocusTarget(const char *target)
const char * getFocusTarget()
virtual bool loadConfig(bool silent, const char *property) override
Load the last saved configuration file.
virtual bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
virtual IPState MoveFocuser(FocusDirection dir, int speed, uint16_t duration) override
MoveFocuser the focuser in a particular direction with a specific speed for a finite duration.
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
virtual bool Handshake() override
perform handshake with device to check communication
virtual bool SetFocuserMaxPosition(uint32_t ticks) override
SetFocuserMaxPosition Update focuser maximum position. It only updates the PresetNP property limits.
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Saves the Device Port and Focuser Presets in the configuration file
virtual bool SetFocuserBacklashEnabled(bool enabled) override
SetFocuserBacklashEnabled Enables or disables the focuser backlash compensation.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
Implementations for common driver routines.
Light vector property descriptor.
Number vector property descriptor.
Switch vector property descriptor.
Text vector property descriptor.