39 bool ISNewSwitch(
const char *dev,
const char *name,
ISState *states,
char *names[],
int n)
override;
40 bool ISNewNumber(
const char *dev,
const char *name,
double values[],
char *names[],
int n)
override;
66 COMPENSATION_MODE_OFF,
67 COMPENSATION_MODE_ONE_SHOT,
68 COMPENSATION_MODE_AUTO,
71 INumber CompensationSettingsN[4];
75 COMPENSATION_SETTING_CHANGE,
76 COMPENSATION_SETTING_STEP,
77 COMPENSATION_SETTING_BACKLASH,
78 COMPENSATION_SETTING_TIMER,
110 bool readTemperature();
112 bool readCompensationInfo();
113 bool readSpeedInfo();
114 bool readSteppingInfo();
115 bool readCoilStatus();
120 bool setCompensationMode(uint8_t mode);
121 bool setCompensationSettings(
double change,
double move,
double backlash,
double timer);
122 bool setSteppingPhase(uint8_t phase);
123 bool setCoilStatus(uint8_t status);
124 bool setMaxSpeed(uint8_t maxSpeed);
129 bool sendCommand(
const char *
cmd,
char * res =
nullptr,
int cmd_len = -1,
int res_len = -1);
130 bool getStartupValues();
131 void hexDump(
char * buf,
const char * data,
int size);
137 int32_t m_TargetDiff { 0 };
138 uint16_t m_TemperatureCounter { 0 };
143 static constexpr
const char * COMPENSATION_TAB =
"Compensation";
144 static constexpr
const char * STEPPING_TAB =
"Stepping";
146 static const char NSTEP_STOP_CHAR { 0x23 };
149 static constexpr
const uint8_t NSTEP_TEMPERATURE_FREQ {10};
151 static constexpr
const uint8_t NSTEP_TIMEOUT {3};
153 static constexpr
const uint8_t NSTEP_LEN {64};
bool initProperties() override
Initilize properties initial state and value. The child class must implement this function.
bool SetFocuserSpeed(int speed) override
SetFocuserSpeed Set Focuser speed.
IPState MoveAbsFocuser(uint32_t targetTicks) override
MoveFocuser the focuser to an absolute position.
void TimerHit() override
Callback function to be called once SetTimer duration elapses.
bool saveConfigItems(FILE *fp) override
saveConfigItems Saves the Device Port and Focuser Presets in the configuration file
IPState MoveRelFocuser(FocusDirection dir, uint32_t ticks) override
MoveFocuser the focuser to an relative position.
bool updateProperties() override
updateProperties is called whenever there is a change in the CONNECTION status of the driver....
bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Process the client newNumber command.
const char * getDefaultName() override
virtual bool Handshake() override
perform handshake with device to check communication
bool AbortFocuser() override
AbortFocuser all focus motion.
bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Process the client newSwitch command.
bool SyncFocuser(uint32_t ticks) override
SyncFocuser Set current position to ticks without moving the focuser.
Number vector property descriptor.
Switch vector property descriptor.