Instrument Neutral Distributed Interface INDI 2.2.5
lacerta_mfoc.h
Go to the documentation of this file.
1/*******************************************************************************
2 Copyright(c) 2018 Franck Le Rhun. All rights reserved.
3 Copyright(c) 2018 Christian Liska. All rights reserved.
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
8 .
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13 .
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*******************************************************************************/
19
20#pragma once
21
22#include "indifocuser.h"
23
25{
26 public:
28
29 bool initProperties() override;
30 void ISGetProperties(const char *dev) override;
31 bool updateProperties() override;
32
33 const char *getDefaultName() override;
34
35 virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override;
36 virtual bool ISNewSwitch(const char *dev, const char *name, ISState *states, char *names[], int n) override;
37
38 protected:
39 virtual bool Handshake() override;
40 virtual IPState MoveAbsFocuser(uint32_t targetTicks) override;
41 virtual IPState MoveRelFocuser(FocusDirection dir, uint32_t ticks) override;
42 virtual bool SetFocuserMaxPosition(uint32_t ticks) override;
43 virtual bool SetFocuserBacklash(int32_t steps) override;
44 virtual bool saveConfigItems(FILE *fp) override;
45
46 private:
47 //virtual bool SetBacklash(double values[], char *names[], int n);
48 virtual bool SetTempComp(double values[], char *names[], int n);
49 virtual uint32_t GetAbsFocuserPosition();
50
51 // Backlash
52 // INumberVectorProperty BacklashNP;
53 // INumber BacklashN[1];
54
55 // Temperature Compensation
56 INDI::PropertyNumber TempCompNP {1};
57
58 enum
59 {
60 MODE_TDIR_BOTH,
61 MODE_TDIR_IN,
62 MODE_TDIR_OUT,
63 MODE_COUNT_TEMP_DIR
64 };
65 INDI::PropertySwitch TempTrackDirSP {3};
66
67 enum
68 {
69 MODE_SAVED_ON,
70 MODE_SAVED_OFF,
71 MODE_COUNT_SAVED
72 };
73 INDI::PropertySwitch StartSavedPositionSP {2};
74 // ISwitch StartSavedPositionS[MODE_COUNT_SAVED];
75
76};
bool updateProperties() override
Updates the state and definition of properties based on the current connection status....
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.
bool initProperties() override
Initializes the default properties for the focuser device. Sets up standard INDI properties,...
virtual IPState MoveRelFocuser(FocusDirection dir, uint32_t ticks) override
MoveFocuser the focuser to an relative position.
virtual bool Handshake() override
Performs a device-specific handshake after a connection is established. This method should be overrid...
const char * getDefaultName() override
void ISGetProperties(const char *dev) override
Handles client requests for property definitions for this device or all devices. Delegates to the bas...
virtual bool SetFocuserBacklash(int32_t steps) override
SetFocuserBacklash Set the focuser backlash compensation value.
virtual bool ISNewNumber(const char *dev, const char *name, double values[], char *names[], int n) override
Processes incoming new number values from the client for this device. Handles updates to FocuserInter...
virtual bool saveConfigItems(FILE *fp) override
virtual IPState MoveAbsFocuser(uint32_t targetTicks) override
MoveFocuser the focuser to an absolute position.
ISState
Switch state.
Definition indiapi.h:148
IPState
Property state.
Definition indiapi.h:158