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
Processes incoming new text values from the client for this device. Delegates processing to the contr...
INumberVectorProperty LedNP
virtual int getVersion(int *major, int *minor, int *sub)
virtual const char * getDefaultName() override
virtual void ISGetProperties(const char *dev) override
Handles client requests for property definitions for this device or all devices. Delegates to the bas...
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
Processes incoming new switch states from the client for this device. Handles updates to FocuserInter...
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
Initializes the default properties for the focuser device. Sets up standard INDI properties,...
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
Updates the state and definition of properties based on the current connection status....
virtual bool Handshake() override
Performs a device-specific handshake after a connection is established. This method should be overrid...
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
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
Processes incoming new number values from the client for this device. Handles updates to FocuserInter...
Implementations for common driver routines.
Light vector property descriptor.
Number vector property descriptor.
Switch vector property descriptor.
Text vector property descriptor.