Instrument Neutral Distributed Interface INDI
2.2.5
drivers
telescope
magellandriver.h
Go to the documentation of this file.
1
/*
2
MAGELLAN Driver
3
Copyright (C) 2011 Onno Hommes (
[email protected]
)
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,
18
Boston, MA 02110-1301 USA
19
20
*/
21
22
#pragma once
23
24
/* Just use Default tracking for what ever telescope is feeding Magellan I */
25
enum
TFreq
26
{
27
MAGELLAN_TRACK_DEFAULT
,
28
MAGELLAN_TRACK_LUNAR
,
29
MAGELLAN_TRACK_MANUAL
30
};
31
32
/* Time Format */
33
enum
TTimeFormat
34
{
35
MAGELLAN_24
,
36
MAGELLAN_AM
,
37
MAGELLAN_PM
38
};
39
40
#define MAGELLAN_TIMEOUT 5
/* FD timeout in seconds */
41
#define MAGELLAN_ERROR -1
/* Default Error Code */
42
#define MAGELLAN_OK 0
/* Default Success Code */
43
#define MAGELLAN_ACK 'P'
/* Default Success Code */
44
45
#define CENTURY_THRESHOLD 91
/* When to goto 21st Century */
46
#define CONNECTION_RETRIES 2
/* Retry Attempt cut-off */
47
48
/* GET formatted sexagisemal value from device, return as double */
49
#define getMAGELLANRA(fd, x) getCommandSexa(fd, x, "#:GR#")
50
#define getMAGELLANDEC(fd, x) getCommandSexa(fd, x, "#:GD#")
51
52
#ifdef __cplusplus
53
extern
"C"
{
54
#endif
55
56
/**************************************************************************
57
Diagnostics
58
**************************************************************************/
59
char
ACK
(
int
fd
);
60
int
check_magellan_connection
(
int
fd
);
61
62
/**************************************************************************
63
Get Commands: store data in the supplied buffer. Return 0 on success or -1
64
on failure
65
**************************************************************************/
66
67
/* Get Double from Sexagisemal */
68
int
getCommandSexa
(
int
fd
,
double
*value,
const
char
*
cmd
);
69
70
/* Get Calendar data */
71
int
getCalendarDate
(
int
fd
,
char
*date);
72
73
#ifdef __cplusplus
74
}
75
#endif
fd
int fd
Definition
intelliscope.c:43
TTimeFormat
TTimeFormat
Definition
lx200driver.h:63
TFreq
TFreq
Definition
lx200driver.h:106
check_magellan_connection
int check_magellan_connection(int fd)
Definition
magellandriver.c:59
MAGELLAN_AM
@ MAGELLAN_AM
Definition
magellandriver.h:36
MAGELLAN_PM
@ MAGELLAN_PM
Definition
magellandriver.h:37
MAGELLAN_24
@ MAGELLAN_24
Definition
magellandriver.h:35
MAGELLAN_TRACK_MANUAL
@ MAGELLAN_TRACK_MANUAL
Definition
magellandriver.h:29
MAGELLAN_TRACK_DEFAULT
@ MAGELLAN_TRACK_DEFAULT
Definition
magellandriver.h:27
MAGELLAN_TRACK_LUNAR
@ MAGELLAN_TRACK_LUNAR
Definition
magellandriver.h:28
getCommandSexa
int getCommandSexa(int fd, double *value, const char *cmd)
Definition
lx200driver.cpp:143
getCalendarDate
int getCalendarDate(int fd, char *date)
Definition
lx200driver.cpp:315
cmd
uint8_t cmd[4]
Definition
pwc-ioctl.h:2
ACK
#define ACK
Definition
stvdriver.h:35
Generated on Thu Oct 22 2026 14:46:48 for Instrument Neutral Distributed Interface INDI by
1.9.8