|
| | FocuserInterface (DefaultDevice *defaultDevice) |
| |
| virtual | ~FocuserInterface ()=default |
| |
| void | initProperties (const char *groupName) |
| | Initialize focuser properties. It is recommended to call this function within initProperties() of your primary device.
|
| |
| bool | updateProperties () |
| | updateProperties Define or Delete Rotator properties based on the connection status of the base device
|
| |
| bool | processNumber (const char *dev, const char *name, double values[], char *names[], int n) |
| | Process focus number properties.
|
| |
| bool | processSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) |
| | Process focus switch properties.
|
| |
| virtual bool | SetFocuserSpeed (int speed) |
| | SetFocuserSpeed Set Focuser speed.
|
| |
| 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.
|
| |
| virtual IPState | MoveAbsFocuser (uint32_t targetTicks) |
| | MoveFocuser the focuser to an absolute position.
|
| |
| virtual IPState | MoveRelFocuser (FocusDirection dir, uint32_t ticks) |
| | MoveFocuser the focuser to an relative position.
|
| |
| virtual bool | ReverseFocuser (bool enabled) |
| | ReverseFocuser Reverse focuser motion direction.
|
| |
| virtual bool | SyncFocuser (uint32_t ticks) |
| | SyncFocuser Set current position to ticks without moving the focuser.
|
| |
| virtual bool | SetFocuserMaxPosition (uint32_t ticks) |
| | SetFocuserMaxPosition Set Focuser Maximum position limit in the hardware.
|
| |
| virtual bool | SetFocuserBacklash (int32_t steps) |
| | SetFocuserBacklash Set the focuser backlash compensation value.
|
| |
| virtual bool | SetFocuserBacklashEnabled (bool enabled) |
| | SetFocuserBacklashEnabled Enables or disables the focuser backlash compensation.
|
| |
| virtual bool | AbortFocuser () |
| | AbortFocuser all focus motion.
|
| |
| bool | saveConfigItems (FILE *fp) |
| | saveConfigItems save focuser properties defined in the interface in config file
|
| |
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 65 of file indifocuserinterface.h.
| bool INDI::FocuserInterface::AbortFocuser |
( |
| ) |
|
|
protectedvirtual |
AbortFocuser all focus motion.
- Returns
- True if abort is successful, false otherwise.
Reimplemented in TeenAstroFocuser, FocusMaster, IndiAstrolink4, IndiAstroLink4mini2, AAF2, ActiveFocuser, AllunaTCS2, AskarWAF, CelestronSCT, DeepSkyDadAF1, DeepSkyDadAF2, DeepSkyDadAF3, DMFC, DreamFocuser, Esatto, EsattoArco, FCUSB, FocusLynxBase, iEAFFocus, IKunFocuser, AlpacaFocuser, lacerta_mfoc_fmc, Lakeside, Microtouch, MoonLite, MoonLiteDRO, MyFocuserPro2, NFocus, NStep, OnFocus, PegasusFocusCube, PegasusFocusCube3, PegasusProdigyMF, PegasusScopsOAG, PerfectStar, EFA, RBFOCUS, RoboFocus, SestoSenso, SestoSenso2, SestoSenso3, SIEFS, SmartFocus, SteelDrive, SteelDriveII, USBFocusV3, PegasusPPBA, PegasusUPB, PegasusUPB3, Gemini, iAFSRotator, Integra, NightCrawler, FocuserDriver, CelestronGPS, LX200_esp32go, LX200_OnStep, LX200_OpenAstroTech, and LX200Telescope.
Definition at line 542 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 FocusLynxBase, SmartFocus, Gemini, FocusMaster, IndiAstrolink4, IndiAstroLink4mini2, AAF2, ActiveFocuser, AllunaTCS2, AskarWAF, astromechanics_foc, CelestronSCT, DeepSkyDadAF1, DeepSkyDadAF2, DeepSkyDadAF3, DMFC, Esatto, EsattoArco, FocusSim, IKunFocuser, AlpacaFocuser, lacerta_mfoc, lacerta_mfoc_fmc, Microtouch, MoonLite, MoonLiteDRO, MyFocuserPro2, NStep, PegasusFocusCube, PegasusFocusCube3, PegasusProdigyMF, PegasusScopsOAG, PerfectStar, PinefeatCEF, EFA, RainbowRSF, RBFOCUS, RoboFocus, SestoSenso, SestoSenso2, SestoSenso3, SIEFS, SteelDrive, SteelDriveII, TCFS, USBFocusV3, PegasusPPBA, PegasusUPB, PegasusUPB3, Integra, NightCrawler, FocuserDriver, CelestronGPS, LX200_esp32go, LX200_OnStep, LX200_OpenAstroTech, TeenAstroFocuser, DreamFocuser, iEAFFocus, Lakeside, OnFocus, and iAFSRotator.
Definition at line 535 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 FocusMaster, DeepSkyDadAF1, DeepSkyDadAF2, DeepSkyDadAF3, FCUSB, FocusSim, FocusLynxBase, HitecAstroDCFocuser, Microtouch, MoonLite, MyFocuserPro2, SteelDrive, Gemini, LX200_OnStep, LX200_OpenAstroTech, and LX200Telescope.
Definition at line 518 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 TeenAstroFocuser, FocusMaster, IndiAstrolink4, IndiAstroLink4mini2, AAF2, ActiveFocuser, AllunaTCS2, AskarWAF, astromechanics_foc, CelestronSCT, DeepSkyDadAF1, DeepSkyDadAF2, DeepSkyDadAF3, DMFC, DreamFocuser, Esatto, EsattoArco, FocusSim, FocusLynxBase, HitecAstroDCFocuser, iEAFFocus, IKunFocuser, lacerta_mfoc, lacerta_mfoc_fmc, Lakeside, Microtouch, MoonLite, MoonLiteDRO, MyFocuserPro2, NFocus, NStep, OnFocus, PegasusFocusCube, PegasusFocusCube3, PegasusProdigyMF, PegasusScopsOAG, PerfectStar, PinefeatCEF, RoboFocus, SestoSenso, SestoSenso2, SestoSenso3, SIEFS, SmartFocus, TCFS, USBFocusV3, PegasusPPBA, PegasusUPB, PegasusUPB3, Gemini, iAFSRotator, Integra, NightCrawler, FocuserDriver, CelestronGPS, LX200_esp32go, LX200_OnStep, and LX200_OpenAstroTech.
Definition at line 527 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 TeenAstroFocuser, IndiAstrolink4, IndiAstroLink4mini2, AskarWAF, DeepSkyDadAF1, DeepSkyDadAF2, DeepSkyDadAF3, DMFC, Esatto, FCUSB, FocusLynxBase, HitecAstroDCFocuser, iEAFFocus, IKunFocuser, Lakeside, MyFocuserPro2, PegasusFocusCube, PegasusFocusCube3, PegasusProdigyMF, EFA, SestoSenso, SestoSenso2, SestoSenso3, SIEFS, SteelDriveII, PegasusPPBA, PegasusUPB, PegasusUPB3, iAFSRotator, and LX200Telescope.
Definition at line 550 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 IndiAstrolink4, IndiAstroLink4mini2, AskarWAF, CelestronSCT, DeepSkyDadAF3, DMFC, Esatto, EsattoArco, FocusSim, FocusLynxBase, lacerta_mfoc, lacerta_mfoc_fmc, Lakeside, PegasusFocusCube, PegasusFocusCube3, RoboFocus, SestoSenso2, SestoSenso3, USBFocusV3, PegasusPPBA, PegasusUPB, PegasusUPB3, Gemini, CelestronGPS, and LX200_OpenAstroTech.
Definition at line 577 of file indifocuserinterface.cpp.
| bool INDI::FocuserInterface::SetFocuserBacklashEnabled |
( |
bool |
enabled | ) |
|
|
protectedvirtual |
SetFocuserBacklashEnabled Enables or disables the focuser backlash compensation.
- Parameters
-
| enable | flag to enable or disable backlash compensation |
- Returns
- True if successful, false otherwise.
Reimplemented in IndiAstrolink4, IndiAstroLink4mini2, AskarWAF, DMFC, FocusSim, FocusLynxBase, Lakeside, PegasusFocusCube, PegasusPPBA, PegasusUPB, PegasusUPB3, and Gemini.
Definition at line 584 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 IndiAstrolink4, IndiAstroLink4mini2, AskarWAF, DeepSkyDadAF1, DeepSkyDadAF2, DeepSkyDadAF3, FocusLynxBase, iEAFFocus, IKunFocuser, lacerta_mfoc, lacerta_mfoc_fmc, MyFocuserPro2, EFA, RBFOCUS, SIEFS, SteelDriveII, iAFSRotator, INDI::Focuser, and TeenAstroFocuser.
Definition at line 571 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 IndiAstrolink4, IndiAstroLink4mini2, AAF2, AskarWAF, DeepSkyDadAF1, DeepSkyDadAF2, DeepSkyDadAF3, DMFC, DreamFocuser, FocusSim, FocusLynxBase, IKunFocuser, lacerta_mfoc_fmc, Microtouch, MoonLite, MoonLiteDRO, MyFocuserPro2, NStep, PegasusFocusCube, PegasusFocusCube3, PegasusProdigyMF, PegasusScopsOAG, PerfectStar, EFA, RBFOCUS, RoboFocus, SIEFS, SteelDriveII, PegasusPPBA, PegasusUPB, PegasusUPB3, FocuserDriver, LX200_OpenAstroTech, and TeenAstroFocuser.
Definition at line 557 of file indifocuserinterface.cpp.