44#include < Arduino.h>
55#include < WString.h>
66
7- void EEPROMupdate (int loc, byte val);
8-
97// Set to 1 if you are in the northern hemisphere.
108#define NORTHERN_HEMISPHERE 1
119
@@ -19,88 +17,126 @@ void EEPROMupdate(int loc, byte val);
1917// Make some variables in the sketch files available to the C++ code.
2018extern bool inSerialControl;
2119extern String version;
22- extern int PolarisRAHour;
23- extern int PolarisRAMinute;
24- extern int PolarisRASecond;
25- // Comment this out to save some code space
26- // #define DEBUG_MODE
27- #ifdef DEBUG_MODE
28- // #define SEND_PERIODIC_UPDATES
29- #endif
30- // Uncomment to run a key diagnostic. No tracker functions are on at all.
31- // #define LCD_BUTTON_TEST
20+ extern byte PolarisRAHour;
21+ extern byte PolarisRAMinute;
22+ extern byte PolarisRASecond;
23+
24+ // Debugging output control
25+ // Each bit in the debug level specifies a kind of debug to enable.
26+ #define DEBUG_NONE 0x00
27+ #define DEBUG_INFO 0x01
28+ #define DEBUG_SERIAL 0x02
29+ #define DEBUG_WIFI 0x04
30+ #define DEBUG_MOUNT 0x08
31+ #define DEBUG_MOUNT_VERBOSE 0x10
32+ #define DEBUG_GENERAL 0x20
33+ #define DEBUG_MEADE 0x40
34+ #define DEBUG_VERBOSE 0x80
35+ #define DEBUG_ANY 0xFF
36+
37+ // Bit Name Output
38+ // 0 DEBUG_INFO General output, like startup variables and status
39+ // 1 DEBUG_SERIAL Serial commands and replies
40+ // 2 DEBUG_WIFI Wifi related output
41+ // 3 DEBUG_MOUNT Mount processing output
42+ // 4 DEBUG_MOUNT_VERBOSE Verbose mount processing (coordinates, etc)
43+ // 5 DEBUG_GENERAL Other misc. output
44+ // 6 DEBUG_MEADE Meade command handling output
45+
46+ // Set this to specify the amount of debug output OAT should send to the serial port.
47+ // Note that if you use an app to control OAT, ANY debug output will likely confuse that app.
48+ // Debug output is useful if you are using Wifi to control the OAT or if you are issuing
49+ // manual commands via a terminal.
50+ //
51+ // #define DEBUG_LEVEL (DEBUG_SERIAL|DEBUG_WIFI|DEBUG_INFO|DEBUG_MOUNT|DEBUG_GENERAL)
52+ // #define DEBUG_LEVEL (DEBUG_ANY)
53+ // #define DEBUG_LEVEL (DEBUG_INFO|DEBUG_MOUNT|DEBUG_GENERAL)
54+ #define DEBUG_LEVEL (DEBUG_NONE)
3255
33- // Uncomment to reverse the direction of RA motor
34- // #define INVERT_RA_DIR
56+ // Set this to 1 to run a key diagnostic. No tracker functions are on at all.
57+ #define LCD_BUTTON_TEST 0
3558
36- // Uncomment to reverse the direction of DEC motor
37- // #define INVERT_DEC_DIR
59+ // Set to 1 to reverse the direction of RA motor
60+ #define INVERT_RA_DIR 0
3861
39- // //////////////////////////////////////////////////////////////
40- //
41- // FEATURE SUPPORT SECTION
42- //
43- // Since the Arduino Uno has very little memory (32KB code, 2KB data) all features
44- // stretch the Uno a little too far. So in order to save memory we allow you to enable
45- // and disable features to help manage memory usage.
46- // If you run the tracker with an Arduino Mega, you can uncomment all the features.
47- //
48- // If you would like to drive your OAT mount with only the LCD Shield,
49- // you should comment out SUPPORT_SERIAL_CONTROL
50- //
51- // If you feel comfortable with configuring the OAT at startup manually, you should comment
52- // out SUPPORT_GUIDED_STARTUP (maybe after you've used it for a while you know what to do).
53- //
54- // The POI menu can take a little data memory and you may not need it. If not, you can comment
55- // out SUPPORT_POINTS_OF_INTEREST
56- //
57- // //////////////////////////////////////////////////////////////
62+ // Set to 1 to reverse the direction of DEC motor
63+ #define INVERT_DEC_DIR 0
5864
59- // If you do not have a LCD shield on your Arduino Uno, uncomment the line below. This is
65+ // If you do not have a LCD shield on your Arduino Uno, set this to 1 on the line below. This is
6066// useful if you are always going to run the mount from a laptop anyway.
61- // #define HEADLESS_CLIENT
67+ #define HEADLESS_CLIENT 0
68+
69+ // This is set to 1 for boards that do not support interrupt timers
70+ #define RUN_STEPPERS_IN_MAIN_LOOP 0
6271
63- #ifdef ESP8266
64- #define HEADLESS_CLIENT
72+ #if defined(ESP8266) || defined(ESP32)
73+ #define ESPBOARD
74+ #undef HEADLESS_CLIENT
75+ #define HEADLESS_CLIENT 1
6576 #define WIFI_ENABLED
66- #define INFRA_SSID " yourSSID "
67- #define INFRA_WPAKEY " yourWPAKey "
77+ #define INFRA_SSID " YouSSID "
78+ #define INFRA_WPAKEY " YourWPAKey "
6879 #define OAT_WPAKEY " superSecret"
6980 #define HOSTNAME " OATerScope"
7081 // 0 - Infrastructure Only - Connecting to a Router
7182 // 1 - AP Mode Only - Acting as a Router
7283 // 2 - Attempt Infrastructure, Fail over to AP Mode.
7384 #define WIFI_MODE 2
85+ #if defined(ESP8266)
86+ #undef RUN_STEPPERS_IN_MAIN_LOOP
87+ #define RUN_STEPPERS_IN_MAIN_LOOP 1
88+ #endif
7489#endif
7590
7691
77- // Uncomment this to enable the heating menu
92+ // //////////////////////////////////////////////////////////////
93+ //
94+ // FEATURE SUPPORT SECTION
95+ //
96+ // Since the Arduino Uno has very little memory (32KB code, 2KB data) all features
97+ // stretch the Uno a little too far. So in order to save memory we allow you to enable
98+ // and disable features to help manage memory usage.
99+ // If you run the tracker with an Arduino Mega, you can set all the features to 1.
100+ //
101+ // If you would like to drive your OAT mount with only the LCD Shield, or are on a Uno,
102+ // you should set SUPPORT_SERIAL_CONTROL to 0
103+ //
104+ // If you feel comfortable with configuring the OAT at startup manually, you should set
105+ // SUPPORT_GUIDED_STARTUP to 0 (maybe after you've used it for a while you know what to do).
106+ //
107+ // The POI menu can take a little data memory and you may not need it. If not, you can set
108+ // SUPPORT_POINTS_OF_INTEREST to 0
109+ //
110+ // //////////////////////////////////////////////////////////////
111+
112+ // Set this to 1 this to enable the heating menu
78113// NOTE: Heating is currently not supported!
79- // #define SUPPORT_HEATING
114+ #define SUPPORT_HEATING 0
115+
116+ #if HEADLESS_CLIENT == 0
80117
81- #ifndef HEADLESS_CLIENT
118+ // Set this to 1 to support Guided Startup
119+ #define SUPPORT_GUIDED_STARTUP 1
82120
83- // Uncomment to support Guided Startup
84- #define SUPPORT_GUIDED_STARTUP
121+ // Set this to 1 to support full GO (was POI) menu.
122+ // If this is set to 0 you still have a GO menu that has Home and Park.
123+ #define SUPPORT_POINTS_OF_INTEREST 1
85124
86- // Uncomment to support full GO (was POI) menu.
87- // If this is commented out you still have a GO menu that has Home and Park.
88- #define SUPPORT_POINTS_OF_INTEREST
125+ // Set this to 1 to support CTRL menu, allowing you to manually slew the mount with the buttons.
126+ #define SUPPORT_MANUAL_CONTROL 1
89127
90- // Uncomment to support CTRL menu, allowing you to manually slew the mount with the buttons.
91- #define SUPPORT_MANUAL_CONTROL
128+ // Set this to 1 to support CAL menu, allowing you to calibrate various things
129+ #define SUPPORT_CALIBRATION 1
92130
93- // Uncomment to support CAL menu, allowing you to calibrate various things
94- #define SUPPORT_CALIBRATION
131+ // Set this to 1 to support INFO menu that displays various pieces of information about the mount.
132+ #define SUPPORT_INFO_DISPLAY 1
95133
96- // Uncomment to support INFO menu that displays various pieces of information about the mount.
97- // #define SUPPORT_INFO_DISPLAY
134+ // Set this to 1 to support Serial Meade LX200 protocol support
135+ #define SUPPORT_SERIAL_CONTROL 1
98136
99- // Uncomment to support Serial Meade LX200 protocol support
100- // #define SUPPORT_SERIAL_CONTROL
101137#else
102138 // If we are making a headleass (no screen, no keyboard) client, always enable Serial.
103- #define SUPPORT_SERIAL_CONTROL
104- #endif
139+ #define SUPPORT_SERIAL_CONTROL 1
140+ #endif // HEADLESS_CLIENT
105141
106- #endif
142+ #endif // _GLOBALS_HPP
0 commit comments