Instrument Neutral Distributed Interface INDI 2.2.5
ieaffocus.h
Go to the documentation of this file.
1/*
2 iOptron iEAF Focuser
3
4 Copyright (C) 2013 Paul de Backer ([email protected])
5 Copyright (C) 2024 Jasem Mutlaq
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20*/
21
22#pragma once
23
24#include "indifocuser.h"
25
27{
28 public:
29 iEAFFocus();
30 ~iEAFFocus();
31
32 virtual bool Handshake() override;
33 const char * getDefaultName() override;
34 virtual bool initProperties() override;
35 virtual bool updateProperties() override;
36 virtual bool ISNewSwitch (const char *dev, const char *name, ISState *states, char *names[], int n) override;
37
38 virtual IPState MoveAbsFocuser(uint32_t ticks) override;
39 virtual IPState MoveRelFocuser(FocusDirection dir, uint32_t ticks) override;
40 virtual bool AbortFocuser() override;
41 virtual void TimerHit() override;
42 virtual bool ReverseFocuser(bool enabled) override;
43 virtual bool SetFocuserMaxPosition(uint32_t ticks) override;
44
45 private:
46 bool m_isMoving {false};
47 bool m_Reversed {false};
48
49 void GetFocusParams();
50 void setZero();
51 bool updateInfo();
52 bool Ack();
53 bool MoveMyFocuser(uint32_t position);
54
55 INDI::PropertyNumber TemperatureNP {1};
56 INDI::PropertySwitch SetZeroSP {1};
57};
58
virtual bool Handshake() override
Performs a device-specific handshake after a connection is established. This method should be overrid...
const char * getDefaultName() override
virtual bool initProperties() override
Initializes the default properties for the focuser device. Sets up standard INDI properties,...
Definition ieaffocus.cpp:58
virtual bool ReverseFocuser(bool enabled) override
ReverseFocuser Reverse focuser motion direction.
virtual bool AbortFocuser() override
AbortFocuser all focus motion.
virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override
Processes incoming new switch states from the client for this device. Handles updates to FocuserInter...
virtual bool SetFocuserMaxPosition(uint32_t ticks) override
SetFocuserMaxPosition Update focuser maximum position. It only updates the PresetNP property limits.
virtual IPState MoveAbsFocuser(uint32_t ticks) override
MoveFocuser the focuser to an absolute position.
virtual bool updateProperties() override
Updates the state and definition of properties based on the current connection status....
Definition ieaffocus.cpp:88
virtual IPState MoveRelFocuser(FocusDirection dir, uint32_t ticks) override
MoveFocuser the focuser to an relative position.
virtual void TimerHit() override
Callback function to be called once SetTimer duration elapses.
ISState
Switch state.
Definition indiapi.h:148
IPState
Property state.
Definition indiapi.h:158