Debian Codegraph @

drivers/telescope/lx200apdriver.h

raw symbols SCIP
1 /*
2 LX200 AP Driver
3 Copyright (C) 2007 Markus Wildi
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
19 */
20
21 #pragma once
22
23 // Used by cp2 driver
24 #define setAPParkcxx . . $ `drivers/telescope/lx200apdriver.h:24:9`!(fd) write(fd, "#:KA#", 4)
25 #define setAPUnParkcxx . . $ `drivers/telescope/lx200apdriver.h:25:9`!(fd) write(fd, "#:PO#", 4)
26
27 // Used by several drivers
28 #define getAPVersionNumbercxx . . $ `drivers/telescope/lx200apdriver.h:28:9`!(fd, x) getCommandString(fd, x, "#:V#")
29 #define setAPClearBuffercxx . . $ `drivers/telescope/lx200apdriver.h:29:9`!(fd) write(fd, "#", 1) /* AP key pad manual startup sequence */
30 #define setAPBackLashCompensationcxx . . $ `drivers/telescope/lx200apdriver.h:30:9`!(fd, x, y, z) setCommandXYZ(fd, x, y, z, "#:Br")
31
32 #define AP_TRACKING_SIDEREALcxx . . $ `drivers/telescope/lx200apdriver.h:32:9`! 0
33 #define AP_TRACKING_SOLARcxx . . $ `drivers/telescope/lx200apdriver.h:33:9`! 1
34 #define AP_TRACKING_LUNARcxx . . $ `drivers/telescope/lx200apdriver.h:34:9`! 2
35 #define AP_TRACKING_CUSTOMcxx . . $ `drivers/telescope/lx200apdriver.h:35:9`! 3
36 #define AP_TRACKING_OFFcxx . . $ `drivers/telescope/lx200apdriver.h:36:9`! 4
37
38 #define AP_PEC_OFFcxx . . $ `drivers/telescope/lx200apdriver.h:38:9`! 0
39 #define AP_PEC_ONcxx . . $ `drivers/telescope/lx200apdriver.h:39:9`! 1
40 #define AP_PEC_RECORDcxx . . $ `drivers/telescope/lx200apdriver.h:40:9`! 2
41 #define AP_PEC_ENCODERcxx . . $ `drivers/telescope/lx200apdriver.h:41:9`! 3
42
43 #ifdef __cpluspluscxx . . $ `<built-in>:454:9`!
44 extern "C" {
45 #endif
46
47 void set_lx200ap_name(const char *deviceName, unsigned int debug_level);
48 int check_lx200ap_connection(int fd);
49 int getAPUTCOffset(int fd, double *value);
50 int setAPObjectAZ(int fd, double az);
51 int setAPObjectAlt(int fd, double alt);
52 int setAPUTCOffset(int fd, double hours);
53 int setAPSlewMode(int fd, int slewMode);
54 int APSyncCM(int fd, char *matchedObject);
55 int APSyncCMR(int fd, char *matchedObject);
56
57 enum APRateTableState
58 {
59 AP_RATE_TABLE_0 = 0,
60 AP_RATE_TABLE_1 = 1,
61 AP_RATE_TABLE_2 = 2,
62 AP_RATE_TABLE_3 = 3,
63 AP_RATE_TABLE_DEFAULT = -1,
64 };
65
66 // Rate selection for legacy drivers
67 int selectAPMoveToRate(int fd, int moveToIndex);
68 int selectAPSlewRate(int fd, int slewIndex);
69 int selectAPCenterRate(int fd, int centerIndex);
70 // Support rate tables in newer drivers
71 int selectAPV2CenterRate(int fd, int centerIndex, APRateTableState rateTable);
72
73 int selectAPTrackingMode(int fd, int trackMode);
74 int selectAPGuideRate(int fd, int guideRate);
75 int selectAPPECState(int fd, int pecstate);
76 int swapAPButtons(int fd, int currentSwap);
77 int setAPObjectRA(int fd, double ra);
78 int setAPObjectDEC(int fd, double dec);
79 int setAPSiteLongitude(int fd, double Long);
80 int setAPSiteLatitude(int fd, double Lat);
81 int setAPRATrackRate(int fd, double rate);
82 int setAPDETrackRate(int fd, double rate);
83 int APSendPulseCmd(int fd, int direction, int duration_msec);
84 void set_lx200ap_exp_name(const char *deviceName, unsigned int debug_level);
85 int check_lx200ap_status(int fd, char *parkStatus, char *slewStatus);
86 int APParkMount(int fd);
87 int APUnParkMount(int fd);
88 int getAPWormPosition(int fd, int *position);
89
90 // Make sure the buffer passed in to getApStatusString (statusString) is at least 32 bytes.
91 int getApStatusString(int fd, char *statusString);
92 bool apStatusParked(const char *statusString);
93 bool apStatusSlewing(const char *statusString);
94 const char *apMountStatus(const char *statusString);
95 int isAPInitialized(int fd, bool *isInitialized);
96
97 APRateTableState apRateTable(const char *statusString);
98 int getApMountFeatures(int fd, bool *hasEncoder, bool *clutchAware);
99 bool apCanHome(int fd);
100 int apHomeAndSync(int fd);
101
102 #ifdef __cpluspluscxx . . $ `<built-in>:454:9`!
103 }
104 #endif