Skip to content

Commit 833bd88

Browse files
ClutchplateDudeintercipereandre-stefanov
authored
V1.13.18 - Updates (#274)
Co-authored-by: Fabian Uehleke <intercipere@gmail.com> Co-authored-by: Andre Stefanov <mail@andrestefanov.de>
1 parent 2f26ee8 commit 833bd88

22 files changed

+1174
-524
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: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
1+
**V1.13.18 - Updates**
2+
- Final changes for OAE
3+
4+
**V1.13.17 - Updates**
5+
- Store AZ/ALT steps per degree and allow them to be set from Meade
6+
- Added more output to the InfoDisplay during boot and fixed a bug in console mode.
7+
- 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).
8+
19
**V1.13.16 - Updates**
210
- Throttled InfoDisplay updates. Turned off on two axis slew, limited to 5Hz on one-axis slew.
311
- Guide pulses are now ignored for DEC as well when at the limits.
412

513
**V1.13.15 - Updates**
14+
- Changes necessary for OAE, add OAE board
615
- Check `INFO_DISPLAY_TYPE` builds in CI
716
- Fix `INFO_DISPLAY_TYPE_I2C_SSD1306_128x64` for esp32 builds
817

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 & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@
8989
#error AZ driver address for DRIVER_TYPE_TMC2209_UART not specified.
9090
#endif
9191
#endif
92-
92+
#elif defined(OAE)
93+
// Valid OAE configuration
9394
#else
9495
#error Configuration does not support AZ. Use at own risk.
9596
#endif
@@ -110,6 +111,9 @@
110111
#endif
111112
#endif
112113

114+
#elif defined(OAE)
115+
// Valid
116+
113117
#else
114118
#warning Configuration does not support ALT. Use at own risk.
115119
#endif
@@ -193,7 +197,7 @@
193197
#warning Missing pin assignments for MS pins
194198
#endif
195199
#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)
200+
#if !defined(DEC_STEP_PIN) || !defined(DEC_DIR_PIN) || !defined(DEC_EN_PIN)
197201
// Required pin assignments missing
198202
#error Missing pin assignments for configured DEC DRIVER_TYPE_TMC2209_UART driver
199203
#endif
@@ -213,7 +217,7 @@
213217
#warning Missing pin assignments for MS pins
214218
#endif
215219
#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)
220+
#if !defined(RA_STEP_PIN) || !defined(RA_DIR_PIN) || !defined(RA_EN_PIN)
217221
// Required pin assignments missing
218222
#error Missing pin assignments for configured RA DRIVER_TYPE_TMC2209_UART driver
219223
#endif
@@ -225,12 +229,12 @@
225229

226230
#if (AZ_STEPPER_TYPE != STEPPER_TYPE_NONE)
227231
#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)
232+
#if !defined(AZ_STEP_PIN) || !defined(AZ_DIR_PIN) || !defined(AZ_EN_PIN)
229233
// Required pin assignments missing
230234
#error Missing pin assignments for configured AZ DRIVER_TYPE_A4988_GENERIC or DRIVER_TYPE_TMC2209_STANDALONE driver
231235
#endif
232236
#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)
237+
#if !defined(AZ_STEP_PIN) || !defined(AZ_DIR_PIN) || !defined(AZ_EN_PIN)
234238
// Required pin assignments missing (ATmega uses SoftwareSerial for this driver)
235239
#error Missing pin assignments for configured AZ DRIVER_TYPE_TMC2209_UART driver
236240
#endif
@@ -243,12 +247,12 @@
243247

244248
#if (ALT_STEPPER_TYPE != STEPPER_TYPE_NONE)
245249
#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)
250+
#if !defined(ALT_STEP_PIN) || !defined(ALT_DIR_PIN) || !defined(ALT_EN_PIN)
247251
// Required pin assignments missing
248252
#error Missing pin assignments for configured AZ DRIVER_TYPE_A4988_GENERIC or DRIVER_TYPE_TMC2209_STANDALONE driver
249253
#endif
250254
#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)
255+
#if !defined(ALT_STEP_PIN) || !defined(ALT_DIR_PIN) || !defined(ALT_EN_PIN)
252256
// Required pin assignments missing (ATmega uses SoftwareSerial for this driver)
253257
#error Missing pin assignments for configured ALT DRIVER_TYPE_TMC2209_UART driver
254258
#endif

Configuration_adv.hpp

Lines changed: 56 additions & 35 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,19 +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-
#define ALT_CIRCUMFERENCE 2419.0f
403-
#if AUTOPA_VERSION == 1
404-
// the ratio of the ALT gearbox for AutoPA V1 (40:3)
405-
#define ALT_WORMGEAR_RATIO (40.0f / 3.0f)
406-
#else
407-
// the ratio of the ALT gearbox for AutoPA V2 (40:1)
408-
#define ALT_WORMGEAR_RATIO (40.0f)
409-
#endif
410-
#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
411434
#define ALTITUDE_STEPS_PER_REV \
412-
(ALT_CORRECTION_FACTOR * (ALT_CIRCUMFERENCE / (ALT_PULLEY_TEETH * GT2_BELT_PITCH)) * ALT_STEPPER_SPR * ALT_MICROSTEPPING \
413-
* 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
414452
#endif
415453
#endif
416454

@@ -620,23 +658,6 @@
620658
// ////////
621659
////////////////////////////////////////////
622660

623-
// Stepper drivers
624-
#if (RA_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
625-
#if defined(ESP32)
626-
#define RA_SERIAL_PORT Serial2 // Can be shared with DEC_SERIAL_PORT
627-
#elif defined(__AVR_ATmega2560__)
628-
// Uses SoftwareSerial
629-
#endif
630-
#endif
631-
632-
#if (DEC_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
633-
#if defined(ESP32)
634-
#define DEC_SERIAL_PORT Serial2 // Can be shared with RA_SERIAL_PORT
635-
#elif defined(__AVR_ATmega2560__)
636-
// Uses SoftwareSerial
637-
#endif
638-
#endif
639-
640661
// Focuser
641662
#if (FOCUS_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
642663
#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.16"
6+
#define VERSION "V1.13.18"

0 commit comments

Comments
 (0)