forked from juanmb/nextdriver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnexstar_aux.h
More file actions
58 lines (40 loc) · 1.68 KB
/
nexstar_aux.h
File metadata and controls
58 lines (40 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/******************************************************************
Author: Juan Menendez Blanco <juanmb@gmail.com>
This code is part of the NexStarAdapter project:
https://github.com/juanmb/NexStarAdapter
This code is based on Andre Paquette's documentation about
the NexStar AUX protocol:
http://www.paquettefamily.ca/nexstar/NexStar_AUX_Commands_10.pdf
*******************************************************************/
#ifndef _nexstar_aux_h_
#define _nexstar_aux_h_
#include <SoftwareSerial.h>
#include "nexstar_base.h"
class NexStarAux : public NexStarBase {
public:
NexStarAux(int rx, int tx, int select);
void init();
int setPosition(uint8_t dest, uint32_t pos);
int getPosition(uint8_t dest, uint32_t *pos);
int gotoPosition(uint8_t dest, bool slow, uint32_t pos);
int move(uint8_t dest, bool dir, uint8_t rate);
int slewDone(uint8_t dest, bool *done);
int setGuiderate(uint8_t dest, bool dir, bool custom_rate, uint32_t rate);
int getVersion(uint8_t dest, char *major, char *minor);
int setApproach(uint8_t dest, bool dir);
int getApproach(uint8_t dest, bool *dir);
void run() {};
//int setAutoGuiderate(uint8_t dest, uint8_t rate);
//int getAutoGuiderate(uint8_t dest, uint8_t *rate);
//int setBacklash(uint8_t dest, bool dir, uint8_t steps);
//int getBacklash(uint8_t dest, bool dir, uint8_t *steps);
protected:
int sendCommand(uint8_t dest, uint8_t id, uint8_t size, char* data,
NexStarMessage *resp);
private:
int newMessage(NexStarMessage *msg, uint8_t dest, uint8_t id,
uint8_t size, char* data);
SoftwareSerial *serial;
int select_pin;
};
#endif