38 FocusSpeedNP[0].fill(
"FOCUS_SPEED_VALUE",
"Focus Speed",
"%3.0f", 0.0, 255.0, 1.0, 255.0);
42 FocusTimerNP[0].fill(
"FOCUS_TIMER_VALUE",
"Focus Timer (ms)",
"%4.0f", 0.0, 5000.0, 50.0, 1000.0);
53 FocusAbsPosNP[0].fill(
"FOCUS_ABSOLUTE_POSITION",
"Steps",
"%.f", 0.0, 100000.0, 1000.0, 0);
58 FocusRelPosNP[0].fill(
"FOCUS_RELATIVE_POSITION",
"Steps",
"%.f", 0.0, 100000.0, 1000.0, 0);
63 FocusSyncNP[0].fill(
"FOCUS_SYNC_VALUE",
"Steps",
"%.f", 0.0, 100000.0, 1000.0, 0);
67 FocusMaxPosNP[0].fill(
"FOCUS_MAX_VALUE",
"Steps",
"%.f", 1e3, 1e6, 1e4, 1e5);
88 FocusBacklashNP[0].fill(
"FOCUS_BACKLASH_VALUE",
"Steps",
"%.f", 0, 1e6, 100, 0);
211 uint32_t maxTravel = rint(values[0]);
276 uint32_t steps =
static_cast<uint32_t
>(values[0]);
293 int newPos = rint(values[0]);
339 int newPos = rint(values[0]);
360 "Requested position out of bound. Focus minimum position is %g",
FocusAbsPosNP[0].getMin());
371 "Requested position out of bound. Focus maximum position is %g",
FocusAbsPosNP[0].getMax());
393 FocusAbsPosNP.apply(
"Focuser is moving %d steps %s...", newPos,
432 if (prevDirection != targetDirection && prevState ==
IPS_BUSY)
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
INDI::PropertyNumber FocusRelPosNP
virtual bool SetFocuserBacklash(int32_t steps)
SetFocuserBacklash Set the focuser backlash compensation value.
INDI::PropertySwitch FocusReverseSP
virtual bool SetFocuserBacklashEnabled(bool enabled)
SetFocuserBacklashEnabled Enables or disables the focuser backlash compensation.
virtual bool ReverseFocuser(bool enabled)
ReverseFocuser Reverse focuser motion direction.
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
INDI::PropertyNumber FocusSyncNP
INDI::PropertySwitch FocusMotionSP
INDI::PropertyNumber FocusSpeedNP
INDI::PropertySwitch FocusAbortSP
INDI::PropertyNumber FocusTimerNP
void initProperties(const char *groupName)
Initialize focuser properties. It is recommended to call this function within initProperties() of you...
virtual bool SetFocuserMaxPosition(uint32_t ticks)
SetFocuserMaxPosition Set Focuser Maximum position limit in the hardware.
INDI::PropertyNumber FocusMaxPosNP
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)
INDI::PropertySwitch FocusBacklashSP
INDI::PropertyNumber FocusBacklashNP
virtual bool AbortFocuser()
AbortFocuser all focus motion.
INDI::PropertyNumber FocusAbsPosNP
virtual IPState MoveAbsFocuser(uint32_t targetTicks)
MoveFocuser the focuser to an absolute position.
*brief user defined string literal for JSON values *sa std::size_t n
#define DEBUGDEVICE(device, priority, msg)
#define DEBUGFDEVICE(device, priority, msg,...)
Namespace to encapsulate INDI client, drivers, and mediator classes.