|
| FocuserInterface (DefaultDevice *defaultDevice) |
|
virtual | ~FocuserInterface ()=default |
|
void | initProperties (const char *groupName) |
| Initilize focuser properties. It is recommended to call this function within initProperties() of your primary device. More...
|
|
bool | updateProperties () |
| updateProperties Define or Delete Rotator properties based on the connection status of the base device More...
|
|
bool | processNumber (const char *dev, const char *name, double values[], char *names[], int n) |
| Process focus number properties. More...
|
|
bool | processSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) |
| Process focus switch properties. More...
|
|
virtual bool | SetFocuserSpeed (int speed) |
| SetFocuserSpeed Set Focuser speed. More...
|
|
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. More...
|
|
virtual IPState | MoveAbsFocuser (uint32_t targetTicks) |
| MoveFocuser the focuser to an absolute position. More...
|
|
virtual IPState | MoveRelFocuser (FocusDirection dir, uint32_t ticks) |
| MoveFocuser the focuser to an relative position. More...
|
|
virtual bool | ReverseFocuser (bool enabled) |
| ReverseFocuser Reverse focuser motion direction. More...
|
|
virtual bool | SyncFocuser (uint32_t ticks) |
| SyncFocuser Set current position to ticks without moving the focuser. More...
|
|
virtual bool | SetFocuserMaxPosition (uint32_t ticks) |
| SetFocuserMaxPosition Set Focuser Maximum position limit in the hardware. More...
|
|
virtual bool | SetFocuserBacklash (int32_t steps) |
| SetFocuserBacklash Set the focuser backlash compensation value. More...
|
|
virtual bool | SetFocuserBacklashEnabled (bool enabled) |
| SetFocuserBacklashEnabled Enables or disables the focuser backlash compensation. More...
|
|
virtual bool | AbortFocuser () |
| AbortFocuser all focus motion. More...
|
|
bool | saveConfigItems (FILE *fp) |
| saveConfigItems save focuser properties defined in the interface in config file More...
|
|
Provides interface to implement focuser functionality.
A focuser can be an independent device, or an embedded focuser within another device (e.g. Camera or mount).
When developing a driver for a fully indepdent focuser device, use INDI::Focuser directly. To add focus functionality to an existing mount or camera driver, subclass INDI::FocuserInterface. In your driver, then call the necessary focuser interface functions.
The interface supports three types of focusers:
- Absolute Position: Focusers that know their absolute position in steps on power up. You can issue GOTO to an absolute position. By definition, position 0 (zero) is where the focuser is completely retracted (i.e. closest to the OTA) and it increases positively as it move outwards. When moving inward, the position value decreases.
- Warning
- Negative values are not accepted for absolute focusers.
- Relateive Position: Focusers that can move in specific steps inwward or outward, but have no information on absolute position on power up.
- DC Motor: Focusers without any position feedback. The only way to reliably control them is by using timers and moving them for specific pulses in or out.
Implement and overwrite the rest of the virtual functions as needed. INDI GPhoto driver is a good example to check for an actual implementation of a focuser interface within a CCD driver.
- Author
- Jasem Mutlaq
Definition at line 63 of file indifocuserinterface.h.
bool INDI::FocuserInterface::AbortFocuser |
( |
| ) |
|
|
protectedvirtual |
AbortFocuser all focus motion.
- Returns
- True if abort is successful, false otherwise.
Reimplemented in LX200Telescope, LX200_OpenAstroTech, LX200_OnStep, CelestronGPS, FocuserDriver, NightCrawler, Integra, Gemini, USBFocusV3, SteelDriveII, SteelDrive, SmartFocus, SIEFS, SestoSenso2, SestoSenso, RoboFocus, RBFOCUS, EFA, PerfectStar, PegasusScopsOAG, PegasusProdigyMF, PegasusFocusCube, OnFocus, NStep, NFocus, MyFocuserPro2, MoonLiteDRO, MoonLite, Microtouch, Lakeside, lacerta_mfoc_fmc, FocusLynxBase, FCUSB, EsattoArco, Esatto, DMFC, DeepSkyDadAF3, DeepSkyDadAF2, DeepSkyDadAF1, CelestronSCT, ActiveFocuser, AAF2, PegasusUPB, PegasusPPBA, FocusMaster, and TeenAstroFocuser.
Definition at line 545 of file indifocuserinterface.cpp.
IPState INDI::FocuserInterface::MoveAbsFocuser |
( |
uint32_t |
targetTicks | ) |
|
|
protectedvirtual |
MoveFocuser the focuser to an absolute position.
- Parameters
-
ticks | The new position of the focuser. |
- Returns
- Return IPS_OK if motion is completed and focuser reached requested position. Return IPS_BUSY if focuser started motion to requested position and is in progress. Return IPS_ALERT if there is an error.
Reimplemented in OnFocus, Lakeside, TeenAstroFocuser, LX200_OpenAstroTech, LX200_OnStep, CelestronGPS, FocuserDriver, NightCrawler, Integra, USBFocusV3, TCFS, SteelDriveII, SteelDrive, SIEFS, SestoSenso2, SestoSenso, RoboFocus, RBFOCUS, RainbowRSF, EFA, PerfectStar, PegasusScopsOAG, PegasusProdigyMF, PegasusFocusCube, NStep, MyFocuserPro2, MoonLiteDRO, MoonLite, Microtouch, lacerta_mfoc_fmc, lacerta_mfoc, FocusSim, EsattoArco, Esatto, DMFC, DeepSkyDadAF3, DeepSkyDadAF2, DeepSkyDadAF1, CelestronSCT, ActiveFocuser, AAF2, PegasusUPB, PegasusPPBA, FocusMaster, Gemini, SmartFocus, and FocusLynxBase.
Definition at line 538 of file indifocuserinterface.cpp.
MoveFocuser the focuser in a particular direction with a specific speed for a finite duration.
- Parameters
-
dir | Direction of focuser, either FOCUS_INWARD or FOCUS_OUTWARD. |
speed | Speed of focuser if supported by the focuser. |
duration | The timeout in milliseconds before the focus motion halts. Pass 0 to move indefinitely. |
- Returns
- Return IPS_OK if motion is completed and focuser reached requested position. Return IPS_BUSY if focuser started motion to requested position and is in progress. Return IPS_ALERT if there is an error.
Reimplemented in LX200Telescope, LX200_OpenAstroTech, LX200_OnStep, Gemini, SteelDrive, MyFocuserPro2, MoonLite, Microtouch, HitecAstroDCFocuser, FocusLynxBase, FocusSim, FCUSB, DeepSkyDadAF3, DeepSkyDadAF2, DeepSkyDadAF1, and FocusMaster.
Definition at line 521 of file indifocuserinterface.cpp.
MoveFocuser the focuser to an relative position.
- Parameters
-
dir | Direction of focuser, either FOCUS_INWARD or FOCUS_OUTWARD. |
ticks | The relative ticks to move. |
- Returns
- Return IPS_OK if motion is completed and focuser reached requested position. Return IPS_BUSY if focuser started motion to requested position and is in progress. Return IPS_ALERT if there is an error.
Reimplemented in LX200_OpenAstroTech, LX200_OnStep, CelestronGPS, FocuserDriver, NightCrawler, Integra, Gemini, USBFocusV3, TCFS, SmartFocus, SIEFS, SestoSenso2, SestoSenso, RoboFocus, PerfectStar, PegasusScopsOAG, PegasusProdigyMF, PegasusFocusCube, OnFocus, NStep, NFocus, MyFocuserPro2, MoonLiteDRO, MoonLite, Microtouch, Lakeside, lacerta_mfoc_fmc, lacerta_mfoc, HitecAstroDCFocuser, FocusLynxBase, FocusSim, EsattoArco, Esatto, DMFC, DeepSkyDadAF3, DeepSkyDadAF2, DeepSkyDadAF1, CelestronSCT, ActiveFocuser, AAF2, PegasusUPB, PegasusPPBA, FocusMaster, and TeenAstroFocuser.
Definition at line 530 of file indifocuserinterface.cpp.
bool INDI::FocuserInterface::ReverseFocuser |
( |
bool |
enabled | ) |
|
|
protectedvirtual |
ReverseFocuser Reverse focuser motion direction.
- Parameters
-
enabled | If true, normal default focuser motion is reversed. If false, the direction is set to the default focuser motion. |
- Returns
- True if successful, false otherwise.
Reimplemented in LX200Telescope, SteelDriveII, SestoSenso2, SestoSenso, EFA, PegasusProdigyMF, PegasusFocusCube, MyFocuserPro2, Lakeside, HitecAstroDCFocuser, FocusLynxBase, FCUSB, Esatto, DMFC, DeepSkyDadAF3, DeepSkyDadAF2, DeepSkyDadAF1, PegasusUPB, PegasusPPBA, and TeenAstroFocuser.
Definition at line 553 of file indifocuserinterface.cpp.
bool INDI::FocuserInterface::SetFocuserBacklash |
( |
int32_t |
steps | ) |
|
|
protectedvirtual |
SetFocuserBacklash Set the focuser backlash compensation value.
- Parameters
-
steps | value in absolute steps to compensate |
- Returns
- True if successful, false otherwise.
Reimplemented in LX200_OpenAstroTech, CelestronGPS, Gemini, USBFocusV3, SestoSenso2, RoboFocus, PegasusFocusCube, Lakeside, lacerta_mfoc_fmc, lacerta_mfoc, FocusLynxBase, FocusSim, EsattoArco, Esatto, DMFC, DeepSkyDadAF3, CelestronSCT, PegasusUPB, and PegasusPPBA.
Definition at line 580 of file indifocuserinterface.cpp.
bool INDI::FocuserInterface::SetFocuserMaxPosition |
( |
uint32_t |
ticks | ) |
|
|
protectedvirtual |
SetFocuserMaxPosition Set Focuser Maximum position limit in the hardware.
- Parameters
-
ticks | maximum steps permitted |
- Returns
- True if successful, false otherwise.
- Note
- If setting maximum position limit in the hardware is not available or not supported, do not override this function as the default implementation will always return true.
Reimplemented in TeenAstroFocuser, INDI::Focuser, SteelDriveII, SIEFS, RBFOCUS, EFA, MyFocuserPro2, lacerta_mfoc_fmc, lacerta_mfoc, FocusLynxBase, and DeepSkyDadAF3.
Definition at line 574 of file indifocuserinterface.cpp.
bool INDI::FocuserInterface::SyncFocuser |
( |
uint32_t |
ticks | ) |
|
|
protectedvirtual |
SyncFocuser Set current position to ticks without moving the focuser.
- Parameters
-
ticks | Desired new sync position. |
- Returns
- True if successful, false otherwise.
Reimplemented in TeenAstroFocuser, FocuserDriver, SteelDriveII, SIEFS, RoboFocus, RBFOCUS, EFA, PerfectStar, PegasusScopsOAG, PegasusProdigyMF, PegasusFocusCube, NStep, MyFocuserPro2, MoonLiteDRO, MoonLite, Microtouch, lacerta_mfoc_fmc, FocusLynxBase, DMFC, DeepSkyDadAF3, DeepSkyDadAF2, DeepSkyDadAF1, AAF2, PegasusUPB, and PegasusPPBA.
Definition at line 560 of file indifocuserinterface.cpp.