Skip to content

Commit 76c39e7

Browse files
Merge branch 'oae-fw' into slew-quit-hang
2 parents 74f6ef1 + 4705edd commit 76c39e7

19 files changed

+540
-69
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.pio
22
.vscode
33
venv
4+
.venv
5+
__pycache__
46
.idea
57
cmake-*
68
CMakeLists.txt

Changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
**V1.13.18 - Updates**
2+
- Final changes for OAE
3+
14
**V1.13.17 - Updates**
5+
- Store AZ/ALT steps per degree and allow them to be set from Meade
26
- Added more output to the InfoDisplay during boot and fixed a bug in console mode.
37
- Fixed a bug that was causing the firmware to hang after a slew, if a :Q# command was issued (thanks to user c3n for tracking it down, pun intended).
48

@@ -7,6 +11,7 @@
711
- Guide pulses are now ignored for DEC as well when at the limits.
812

913
**V1.13.15 - Updates**
14+
- Changes necessary for OAE, add OAE board
1015
- Check `INFO_DISPLAY_TYPE` builds in CI
1116
- Fix `INFO_DISPLAY_TYPE_I2C_SSD1306_128x64` for esp32 builds
1217

Configuration.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,8 @@
260260
#include "boards/RAMPS/pins_RAMPS.hpp"
261261
#elif (BOARD == BOARD_ESP32_ESP32DEV)
262262
#include "boards/ESP32_ESP32DEV/pins_ESP32DEV.hpp"
263+
#elif (BOARD == BOARD_OAE_V1)
264+
#include "boards/ESP32_ESP32DEV/pins_OAE_V1.hpp"
263265
#elif (BOARD == BOARD_AVR_MKS_GEN_L_V1)
264266
#include "boards/AVR_MKS_GEN_L_V1/pins_MKS_GEN_L_V1.h"
265267
#elif (BOARD == BOARD_AVR_MKS_GEN_L_V2)

ConfigurationValidation.hpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@
8989
#error AZ driver address for DRIVER_TYPE_TMC2209_UART not specified.
9090
#endif
9191
#endif
92+
#elif defined(BOARD_OAE_V1)
93+
// Valid
9294

9395
#else
9496
#error Configuration does not support AZ. Use at own risk.
@@ -110,6 +112,9 @@
110112
#endif
111113
#endif
112114

115+
#elif defined(BOARD_OAE_V1)
116+
// Valid
117+
113118
#else
114119
#warning Configuration does not support ALT. Use at own risk.
115120
#endif
@@ -193,7 +198,7 @@
193198
#warning Missing pin assignments for MS pins
194199
#endif
195200
#elif (DEC_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
196-
#if !defined(DEC_STEP_PIN) || !defined(DEC_DIR_PIN) || !defined(DEC_EN_PIN) || !defined(DEC_DIAG_PIN)
201+
#if !defined(DEC_STEP_PIN) || !defined(DEC_DIR_PIN) || !defined(DEC_EN_PIN)
197202
// Required pin assignments missing
198203
#error Missing pin assignments for configured DEC DRIVER_TYPE_TMC2209_UART driver
199204
#endif
@@ -213,7 +218,7 @@
213218
#warning Missing pin assignments for MS pins
214219
#endif
215220
#elif (RA_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
216-
#if !defined(RA_STEP_PIN) || !defined(RA_DIR_PIN) || !defined(RA_EN_PIN) || !defined(RA_DIAG_PIN)
221+
#if !defined(RA_STEP_PIN) || !defined(RA_DIR_PIN) || !defined(RA_EN_PIN)
217222
// Required pin assignments missing
218223
#error Missing pin assignments for configured RA DRIVER_TYPE_TMC2209_UART driver
219224
#endif
@@ -225,12 +230,12 @@
225230

226231
#if (AZ_STEPPER_TYPE != STEPPER_TYPE_NONE)
227232
#if (AZ_DRIVER_TYPE == DRIVER_TYPE_A4988_GENERIC) || (AZ_DRIVER_TYPE == DRIVER_TYPE_TMC2209_STANDALONE)
228-
#if !defined(AZ_STEP_PIN) || !defined(AZ_DIR_PIN) || !defined(AZ_EN_PIN) || !defined(AZ_DIAG_PIN)
233+
#if !defined(AZ_STEP_PIN) || !defined(AZ_DIR_PIN) || !defined(AZ_EN_PIN)
229234
// Required pin assignments missing
230235
#error Missing pin assignments for configured AZ DRIVER_TYPE_A4988_GENERIC or DRIVER_TYPE_TMC2209_STANDALONE driver
231236
#endif
232237
#elif (AZ_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
233-
#if !defined(AZ_STEP_PIN) || !defined(AZ_DIR_PIN) || !defined(AZ_EN_PIN) || !defined(AZ_DIAG_PIN)
238+
#if !defined(AZ_STEP_PIN) || !defined(AZ_DIR_PIN) || !defined(AZ_EN_PIN)
234239
// Required pin assignments missing (ATmega uses SoftwareSerial for this driver)
235240
#error Missing pin assignments for configured AZ DRIVER_TYPE_TMC2209_UART driver
236241
#endif
@@ -243,12 +248,12 @@
243248

244249
#if (ALT_STEPPER_TYPE != STEPPER_TYPE_NONE)
245250
#if (ALT_DRIVER_TYPE == DRIVER_TYPE_A4988_GENERIC) || (ALT_DRIVER_TYPE == DRIVER_TYPE_TMC2209_STANDALONE)
246-
#if !defined(ALT_STEP_PIN) || !defined(ALT_DIR_PIN) || !defined(ALT_EN_PIN) || !defined(ALT_DIAG_PIN)
251+
#if !defined(ALT_STEP_PIN) || !defined(ALT_DIR_PIN) || !defined(ALT_EN_PIN)
247252
// Required pin assignments missing
248253
#error Missing pin assignments for configured AZ DRIVER_TYPE_A4988_GENERIC or DRIVER_TYPE_TMC2209_STANDALONE driver
249254
#endif
250255
#elif (ALT_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
251-
#if !defined(ALT_STEP_PIN) || !defined(ALT_DIR_PIN) || !defined(ALT_EN_PIN) || !defined(ALT_DIAG_PIN)
256+
#if !defined(ALT_STEP_PIN) || !defined(ALT_DIR_PIN) || !defined(ALT_EN_PIN)
252257
// Required pin assignments missing (ATmega uses SoftwareSerial for this driver)
253258
#error Missing pin assignments for configured ALT DRIVER_TYPE_TMC2209_UART driver
254259
#endif

Configuration_adv.hpp

Lines changed: 56 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@
2222
#define BUFFER_LOGS false
2323
#endif
2424

25+
#ifndef OAM
26+
#ifndef OAE
27+
#define OAT "OAT"
28+
#endif
29+
#endif
30+
#if defined(OAE) && defined(OAM)
31+
#error "OAE and OAM cannot be defined at the same time"
32+
#endif
33+
2534
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2635
// ////////
2736
// MOTOR & DRIVER SETTINGS ////////
@@ -232,14 +241,14 @@
232241
#endif
233242

234243
#ifndef DEC_LIMIT_UP
235-
#ifdef OAM
244+
#if defined(OAM) || defined(OAE)
236245
#define DEC_LIMIT_UP 135.0f
237246
#else
238247
#define DEC_LIMIT_UP 0.0f
239248
#endif
240249
#endif
241250
#ifndef DEC_LIMIT_DOWN
242-
#ifdef OAM
251+
#if defined(OAM) || defined(OAE)
243252
#define DEC_LIMIT_DOWN 135.0f
244253
#else
245254
#define DEC_LIMIT_DOWN 0.0f
@@ -332,16 +341,34 @@
332341
#define AZ_STEPPER_ACCELERATION (100 * AZ_MICROSTEPPING)
333342
#endif
334343

335-
// the Circumference of the AZ rotation. 808mm dia.
344+
// the Circumference of the AZ rotation. 808mm dia (OAT)
336345
#ifndef AZ_CIRCUMFERENCE
337-
#define AZ_CIRCUMFERENCE 2538.4f
346+
#ifdef OAE
347+
// Roughly from the joint to the rod placement is 70mm
348+
#define AZ_CIRCUMFERENCE 56.0f * 2 * PI
349+
#ifndef AZ_ROD_PITCH
350+
#define AZ_ROD_PITCH 0.5
351+
#endif
352+
#define AZIMUTH_STEPS_PER_REV \
353+
+(AZ_CORRECTION_FACTOR * (AZ_CIRCUMFERENCE / AZ_ROD_PITCH) * AZ_STEPPER_SPR * AZ_MICROSTEPPING) // Actually u-steps/rev
354+
#else
355+
#define AZ_CIRCUMFERENCE 2538.4f
356+
#endif
338357
#endif
358+
359+
#ifndef OAE
360+
#define AZ_WORMGEAR_RATIO 1.0f
361+
#endif
362+
339363
#ifndef AZIMUTH_STEPS_PER_REV
340364
#define AZIMUTH_STEPS_PER_REV \
341365
(AZ_CORRECTION_FACTOR * (AZ_CIRCUMFERENCE / (AZ_PULLEY_TEETH * GT2_BELT_PITCH)) * AZ_STEPPER_SPR \
342366
* AZ_MICROSTEPPING) // Actually u-steps/rev
343367
#endif
344-
#define AZIMUTH_STEPS_PER_ARC_MINUTE (AZIMUTH_STEPS_PER_REV / (360 * 60.0f)) // Used to determine move distance in steps
368+
369+
#ifndef AZIMUTH_STEPS_PER_ARC_MINUTE
370+
#define AZIMUTH_STEPS_PER_ARC_MINUTE (AZIMUTH_STEPS_PER_REV / (360 * 60.0f)) // Used to determine move distance in steps
371+
#endif
345372

346373
// AZ TMC2209 UART settings
347374
// These settings work only with TMC2209 in UART connection (single wire to TX)
@@ -373,7 +400,7 @@
373400
#define ALT_MICROSTEPPING 4
374401
#endif
375402
#ifndef ALT_STEPPER_SPR
376-
#define ALT_STEPPER_SPR 400 // NEMA 0.9° = 400 | NEMA 1.8° = 200
403+
#define ALT_STEPPER_SPR (400.0) // NEMA 0.9° = 400 | NEMA 1.8° = 200
377404
#endif
378405
#ifndef ALT_STEPPER_SPEED
379406
#define ALT_STEPPER_SPEED 2000
@@ -398,21 +425,30 @@
398425
(ALT_CORRECTION_FACTOR * (ALT_CIRCUMFERENCE / ALT_ROD_PITCH) * ALT_STEPPER_SPR * ALT_MICROSTEPPING) // Actually u-steps/rev
399426

400427
#else
401-
// the Circumference of the AZ rotation. 770mm dia.
402-
#ifndef ALT_CIRCUMFERENCE
403-
#define ALT_CIRCUMFERENCE 2419.0f
404-
#endif
405-
#if AUTOPA_VERSION == 1
406-
// the ratio of the ALT gearbox for AutoPA V1 (40:3)
407-
#define ALT_WORMGEAR_RATIO (40.0f / 3.0f)
408-
#else
409-
// the ratio of the ALT gearbox for AutoPA V2 (40:1)
410-
#define ALT_WORMGEAR_RATIO (40.0f)
411-
#endif
412-
#ifndef ALTITUDE_STEPS_PER_REV
428+
#ifdef OAE
429+
#ifndef ALT_ROD_PITCH
430+
#define ALT_ROD_PITCH 1.25 // mm/rev
431+
#endif
432+
// the Circumference of the ALT rotation. Roughly 146mm radius.
433+
#define ALT_CIRCUMFERENCE 130.0f * 2 * PI
413434
#define ALTITUDE_STEPS_PER_REV \
414-
(ALT_CORRECTION_FACTOR * (ALT_CIRCUMFERENCE / (ALT_PULLEY_TEETH * GT2_BELT_PITCH)) * ALT_STEPPER_SPR * ALT_MICROSTEPPING \
415-
* ALT_WORMGEAR_RATIO) // Actually u-steps/rev
435+
+(ALT_CORRECTION_FACTOR * (ALT_CIRCUMFERENCE / ALT_ROD_PITCH) * ALT_STEPPER_SPR \
436+
* ALT_MICROSTEPPING) // Actually u-steps/rev
437+
#else
438+
// the Circumference of the AZ rotation. 770mm dia.
439+
#define ALT_CIRCUMFERENCE 2419.0f
440+
#if AUTOPA_VERSION == 1
441+
// the ratio of the ALT gearbox for AutoPA V1 (40:3)
442+
#define ALT_WORMGEAR_RATIO (40.0f / 3.0f)
443+
#else
444+
// the ratio of the ALT gearbox for AutoPA V2 (40:1)
445+
#define ALT_WORMGEAR_RATIO (40.0f)
446+
#endif
447+
#ifndef ALTITUDE_STEPS_PER_REV
448+
#define ALTITUDE_STEPS_PER_REV \
449+
(ALT_CORRECTION_FACTOR * (ALT_CIRCUMFERENCE / (ALT_PULLEY_TEETH * GT2_BELT_PITCH)) * ALT_STEPPER_SPR \
450+
* ALT_MICROSTEPPING * ALT_WORMGEAR_RATIO) // Actually u-steps/rev
451+
#endif
416452
#endif
417453
#endif
418454

@@ -622,23 +658,6 @@
622658
// ////////
623659
////////////////////////////////////////////
624660

625-
// Stepper drivers
626-
#if (RA_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
627-
#if defined(ESP32)
628-
#define RA_SERIAL_PORT Serial2 // Can be shared with DEC_SERIAL_PORT
629-
#elif defined(__AVR_ATmega2560__)
630-
// Uses SoftwareSerial
631-
#endif
632-
#endif
633-
634-
#if (DEC_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
635-
#if defined(ESP32)
636-
#define DEC_SERIAL_PORT Serial2 // Can be shared with RA_SERIAL_PORT
637-
#elif defined(__AVR_ATmega2560__)
638-
// Uses SoftwareSerial
639-
#endif
640-
#endif
641-
642661
// Focuser
643662
#if (FOCUS_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
644663
#if defined(ESP32)

Constants.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
// ESP32 based boards
2020
#define BOARD_ESP32_ESP32DEV 1001
21+
#define BOARD_OAE_V1 1002
2122

2223
/**
2324
* Supported keypad/display types. Use one of these values for DISPLAY_TYPE configuration matching your used display and keypad.

LocalConfiguration.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#include "Configuration_local_mksgenlv1.hpp"
1717
#elif BOARD == BOARD_ESP32_ESP32DEV && __has_include("Configuration_local_esp32dev.hpp")
1818
#include "Configuration_local_esp32dev.hpp"
19+
#elif BOARD == BOARD_OAE_V1 && __has_include("Configuration_local_oae.hpp")
20+
#include "Configuration_local_oae.hpp"
1921
#elif __has_include("Configuration_local.hpp")
2022
#include "Configuration_local.hpp"
2123
#endif

Version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
// Also, numbers are interpreted as simple numbers. _ __ _
44
// So 1.8 is actually 1.08, meaning that 1.12 is a later version than 1.8. \_(..)_/
55

6-
#define VERSION "V1.13.17"
6+
#define VERSION "V1.13.18"

0 commit comments

Comments
 (0)