38 virtual bool ISNewNumber(
const char * dev,
const char * name,
double values[],
char * names[],
int n)
override;
39 virtual bool ISNewSwitch(
const char * dev,
const char * name,
ISState * states,
char * names[],
int n)
override;
97 bool sendCommand(
const char *
cmd,
char * res =
nullptr,
bool silent =
false,
int nret = 0);
100 void GetFocusParams();
104 bool readTemperature();
116 bool setSpeed(
int speed);
117 bool setTemperatureCalibration(
double calibration);
118 bool setTemperatureCoefficient(
double coefficient);
119 bool setTemperatureCompensation(
bool enable);
120 void timedMoveCallback();
122 uint32_t targetPos { 0 }, lastPos { 0 }, lastTemperature { 0 };
133 INumber TemperatureSettingN[2];
137 ISwitch TemperatureCompensateS[2];
141 static const uint8_t ML_RES { 32 };
143 static const char ML_DEL {
'#' };
145 static const uint8_t ML_TIMEOUT { 3 };
virtual ~MoonLite() override=default
virtual IPState MoveFocuser(FocusDirection dir, int speed, uint16_t duration) override
MoveFocuser Move focuser in a specific direction and speed for period of time.
virtual bool saveConfigItems(FILE *fp) override
saveConfigItems Saves the Device Port and Focuser Presets in the configuration file
static void timedMoveHelper(void *context)
virtual void TimerHit() override
Callback function to be called once SetTimer duration elapses.
virtual bool SetFocuserSpeed(int speed) override
SetFocuserSpeed Set Focuser speed.
const char * getDefaultName() override
virtual bool SyncFocuser(uint32_t ticks) override
SyncFocuser Set the supplied position as the current focuser position.
virtual bool Handshake() override
Handshake Try to communicate with Focuser and see if there is a valid response.
virtual bool AbortFocuser() override
AbortFocuser all focus motion.
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
virtual IPState MoveAbsFocuser(uint32_t targetTicks) override
MoveAbsFocuser Move to an absolute target position.
virtual bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
virtual bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
virtual IPState MoveRelFocuser(FocusDirection dir, uint32_t ticks) override
MoveRelFocuser Move focuser for a relative amount of ticks in a specific direction.
Number vector property descriptor.
Switch vector property descriptor.