80 RotatorLimitsNP[0].
fill(
"ROTATOR_LIMITS_VALUE",
"Safe Range (degrees)",
"%.f", 0, 360, 30, 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);
263 (enabled ?
"reversed" :
"normal"));
284 (enabled ?
"enabled" :
"disabled"));
const char * getDeviceName() const
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
bool updateProperty(PropertyType &property, ValueType *values, char *names[], int n, std::function< bool()> updater, bool saveConfig=false)
Generic helper function to update an INDI property based on an external operation.
virtual bool deleteProperty(const char *propertyName)
Delete a property and unregister it. It will also be deleted from all clients.
void defineProperty(INumberVectorProperty *property)
void setState(IPState state)
void apply(const char *format,...) const ATTRIBUTE_FORMAT_PRINTF(2
void save(FILE *f) const
save Save property to configuration file.
bool isNameMatch(const char *otherName) const
void fill(const char *device, const char *name, const char *label, const char *group, IPerm permission, double timeout, IPState state)
void fill(const char *device, const char *name, const char *label, const char *group, IPerm permission, ISRule rule, double timeout, IPState state)
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.
#define DEBUGDEVICE(device, priority, msg)
#define DEBUGFDEVICE(device, priority, msg,...)
Namespace to encapsulate INDI client, drivers, and mediator classes.