84 "Reverse Motion", groupName,
IP_RW,
91 "Backlash", groupName,
IP_RW,
218 uint32_t maxTravel = rint(values[0]);
283 uint32_t steps =
static_cast<uint32_t
>(values[0]);
300 int newPos = rint(values[0]);
346 int newPos = rint(values[0]);
367 "Requested position out of bound. Focus minimum position is %g",
FocusAbsPosN[0].
min);
378 "Requested position out of bound. Focus maximum position is %g",
FocusAbsPosN[0].
max);
436 if (prevDirection != targetDirection && prevState ==
IPS_BUSY)
const char * getDeviceName() const
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
virtual bool saveConfig(bool silent=false, const char *property=nullptr)
Save the current properties in a configuration file.
virtual bool deleteProperty(const char *propertyName)
Delete a property and unregister it. It will also be deleted from all clients.
void defineProperty(INumberVectorProperty *property)
ISwitchVectorProperty FocusMotionSP
INumberVectorProperty FocusSpeedNP
INumberVectorProperty FocusSyncNP
INumberVectorProperty FocusBacklashNP
virtual bool SetFocuserBacklash(int32_t steps)
SetFocuserBacklash Set the focuser backlash compensation value.
virtual bool SetFocuserBacklashEnabled(bool enabled)
SetFocuserBacklashEnabled Enables or disables the focuser backlash compensation.
virtual bool ReverseFocuser(bool enabled)
ReverseFocuser Reverse focuser motion direction.
ISwitchVectorProperty FocusBacklashSP
INumberVectorProperty FocusAbsPosNP
INumberVectorProperty FocusRelPosNP
virtual IPState MoveFocuser(FocusDirection dir, int speed, uint16_t duration)
MoveFocuser the focuser in a particular direction with a specific speed for a finite duration.
bool updateProperties()
updateProperties Define or Delete Rotator properties based on the connection status of the base devic...
virtual IPState MoveRelFocuser(FocusDirection dir, uint32_t ticks)
MoveFocuser the focuser to an relative position.
DefaultDevice * m_defaultDevice
INumberVectorProperty FocusTimerNP
ISwitchVectorProperty FocusReverseSP
INumber FocusBacklashN[1]
void initProperties(const char *groupName)
Initilize focuser properties. It is recommended to call this function within initProperties() of your...
virtual bool SetFocuserMaxPosition(uint32_t ticks)
SetFocuserMaxPosition Set Focuser Maximum position limit in the hardware.
bool saveConfigItems(FILE *fp)
saveConfigItems save focuser properties defined in the interface in config file
bool processNumber(const char *dev, const char *name, double values[], char *names[], int n)
Process focus number properties.
virtual bool SetFocuserSpeed(int speed)
SetFocuserSpeed Set Focuser speed.
bool processSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
Process focus switch properties.
virtual bool SyncFocuser(uint32_t ticks)
SyncFocuser Set current position to ticks without moving the focuser.
FocuserInterface(DefaultDevice *defaultDevice)
INumberVectorProperty FocusMaxPosNP
ISwitch FocusBacklashS[2]
virtual bool AbortFocuser()
AbortFocuser all focus motion.
ISwitchVectorProperty FocusAbortSP
virtual IPState MoveAbsFocuser(uint32_t targetTicks)
MoveFocuser the focuser to an absolute position.
void IUSaveConfigSwitch(FILE *fp, const ISwitchVectorProperty *svp)
Add a switch vector property value to the configuration file.
void IUFillNumberVector(INumberVectorProperty *nvp, INumber *np, int nnp, const char *dev, const char *name, const char *label, const char *group, IPerm p, double timeout, IPState s)
Assign attributes for a number vector property. The vector's auxiliary elements will be set to NULL.
int IUFindOnSwitchIndex(const ISwitchVectorProperty *svp)
Returns the index of first ON switch it finds in the vector switch property.
void IUResetSwitch(ISwitchVectorProperty *svp)
Reset all switches in a switch vector property to OFF.
void IUSaveConfigNumber(FILE *fp, const INumberVectorProperty *nvp)
Add a number vector property value to the configuration file.
void IUFillSwitch(ISwitch *sp, const char *name, const char *label, ISState s)
Assign attributes for a switch property. The switch's auxiliary elements will be set to NULL.
void IUFillNumber(INumber *np, const char *name, const char *label, const char *format, double min, double max, double step, double value)
Assign attributes for a number property. The number's auxiliary elements will be set to NULL.
void IUFillSwitchVector(ISwitchVectorProperty *svp, ISwitch *sp, int nsp, const char *dev, const char *name, const char *label, const char *group, IPerm p, ISRule r, double timeout, IPState s)
Assign attributes for a switch vector property. The vector's auxiliary elements will be set to NULL.
int IUUpdateSwitch(ISwitchVectorProperty *svp, ISState *states, char *names[], int n)
Update all switches in a switch vector property.
void IDSetNumber(const INumberVectorProperty *nvp, const char *fmt,...)
void IDSetSwitch(const ISwitchVectorProperty *svp, const char *fmt,...)
int IUUpdateNumber(INumberVectorProperty *nvp, double values[], char *names[], int n)
Update all numbers in a number vector property.
void IUUpdateMinMax(const INumberVectorProperty *nvp)
Function to update the min and max elements of a number in the client.
#define DEBUGDEVICE(device, priority, msg)
#define DEBUGFDEVICE(device, priority, msg,...)
Namespace to encapsulate INDI client, drivers, and mediator classes.