39 GotoRotatorNP[0].fill(
"ANGLE",
"Angle",
"%.2f", 0, 360., 10., 0.);
50 SyncRotatorNP[0].fill(
"ANGLE",
"Angle",
"%.2f", 0, 360., 10., 0.);
74 RotatorBacklashNP[0].fill(
"ROTATOR_BACKLASH_VALUE",
"Steps",
"%.f", 0, 1e6, 100, 0);
80 RotatorLimitsNP[0].fill(
"ROTATOR_LIMITS_VALUE",
"Safe Range (degrees)",
"%.f", 0, 360, 30, 0);
89 if (dev !=
nullptr && strcmp(dev,
m_defaultDevice->getDeviceName()) == 0)
119 while (delta > 180.0) delta -= 360.0;
120 while (delta < -180.0) delta += 360.0;
121 if (std::abs(delta) > limit / 2.0)
125 "Rotator target %.2f exceeds safe limits (±%.1f° from reference %.2f°)...",
176 uint32_t steps =
static_cast<uint32_t
>(values[0]);
196 double half = values[0] / 2.0;
197 double startAngle = ref - half;
198 if (startAngle < 0) startAngle += 360.0;
199 double endAngle = ref + half;
200 if (endAngle >= 360) endAngle -= 360.0;
202 "Rotator limits set to %.f degrees. Safe range: %.2f to %.2f degrees (reference: %.2f°).",
203 values[0], startAngle, endAngle, ref);
220 if (dev !=
nullptr && strcmp(dev,
m_defaultDevice->getDeviceName()) == 0)
265 (enabled ?
"reversed" :
"normal"));
288 (enabled ?
"enabled" :
"disabled"));
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
INDI::PropertySwitch AbortRotatorSP
bool processSwitch(const char *dev, const char *name, ISState *states, char *names[], int n)
Process Rotator switch properties.
virtual IPState MoveRotator(double angle)=0
MoveRotator Go to specific angle.
bool saveConfigItems(FILE *fp)
saveConfigItems save focuser properties defined in the interface in config file
INDI::PropertySwitch RotatorBacklashSP
virtual bool AbortRotator()
AbortRotator Abort all motion.
RotatorInterface(DefaultDevice *defaultDevice)
INDI::PropertyNumber RotatorLimitsNP
void initProperties(const char *groupName)
Initialize Rotator properties. It is recommended to call this function within initProperties() of you...
bool updateProperties()
updateProperties Define or Delete Rotator properties based on the connection status of the base devic...
INDI::PropertyNumber SyncRotatorNP
virtual bool SyncRotator(double angle)
SyncRotator Set current angle as the supplied angle without moving the rotator.
virtual bool ReverseRotator(bool enabled)
ReverseRotator Reverse the direction of the rotator. CW is usually the normal direction,...
virtual bool SetRotatorBacklashEnabled(bool enabled)
SetRotatorBacklashEnabled Enables or disables the Rotator backlash compensation.
INDI::PropertyNumber RotatorBacklashNP
INDI::PropertySwitch HomeRotatorSP
bool processNumber(const char *dev, const char *name, double values[], char *names[], int n)
Process Rotator number properties.
DefaultDevice * m_defaultDevice
virtual IPState HomeRotator()
HomeRotator Go to home position.
INDI::PropertySwitch ReverseRotatorSP
INDI::PropertyNumber GotoRotatorNP
virtual bool SetRotatorBacklash(int32_t steps)
SetRotatorBacklash Set the Rotatorer backlash compensation value.
const char * IUFindOnSwitchName(ISState *states, char *names[], int n)
Returns the name of the first ON switch it finds in the supplied arguments.
*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.