Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
.pio
.vscode
venv
.venv
__pycache__
.idea
cmake-*
CMakeLists.txt
Expand Down
9 changes: 9 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
**V1.13.18 - Updates**
- Final changes for OAE

**V1.13.17 - Updates**
- Store AZ/ALT steps per degree and allow them to be set from Meade
- Added more output to the InfoDisplay during boot and fixed a bug in console mode.
- 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).

**V1.13.16 - Updates**
- Throttled InfoDisplay updates. Turned off on two axis slew, limited to 5Hz on one-axis slew.
- Guide pulses are now ignored for DEC as well when at the limits.

**V1.13.15 - Updates**
- Changes necessary for OAE, add OAE board
- Check `INFO_DISPLAY_TYPE` builds in CI
- Fix `INFO_DISPLAY_TYPE_I2C_SSD1306_128x64` for esp32 builds

Expand Down
2 changes: 2 additions & 0 deletions Configuration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@
#include "boards/RAMPS/pins_RAMPS.hpp"
#elif (BOARD == BOARD_ESP32_ESP32DEV)
#include "boards/ESP32_ESP32DEV/pins_ESP32DEV.hpp"
#elif (BOARD == BOARD_OAE_V1)
#include "boards/ESP32_ESP32DEV/pins_OAE_V1.hpp"
#elif (BOARD == BOARD_AVR_MKS_GEN_L_V1)
#include "boards/AVR_MKS_GEN_L_V1/pins_MKS_GEN_L_V1.h"
#elif (BOARD == BOARD_AVR_MKS_GEN_L_V2)
Expand Down
18 changes: 11 additions & 7 deletions ConfigurationValidation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@
#error AZ driver address for DRIVER_TYPE_TMC2209_UART not specified.
#endif
#endif

#elif defined(OAE)
// Valid OAE configuration
#else
#error Configuration does not support AZ. Use at own risk.
#endif
Expand All @@ -110,6 +111,9 @@
#endif
#endif

#elif defined(OAE)
// Valid

#else
#warning Configuration does not support ALT. Use at own risk.
#endif
Expand Down Expand Up @@ -193,7 +197,7 @@
#warning Missing pin assignments for MS pins
#endif
#elif (DEC_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
#if !defined(DEC_STEP_PIN) || !defined(DEC_DIR_PIN) || !defined(DEC_EN_PIN) || !defined(DEC_DIAG_PIN)
#if !defined(DEC_STEP_PIN) || !defined(DEC_DIR_PIN) || !defined(DEC_EN_PIN)
// Required pin assignments missing
#error Missing pin assignments for configured DEC DRIVER_TYPE_TMC2209_UART driver
#endif
Expand All @@ -213,7 +217,7 @@
#warning Missing pin assignments for MS pins
#endif
#elif (RA_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
#if !defined(RA_STEP_PIN) || !defined(RA_DIR_PIN) || !defined(RA_EN_PIN) || !defined(RA_DIAG_PIN)
#if !defined(RA_STEP_PIN) || !defined(RA_DIR_PIN) || !defined(RA_EN_PIN)
// Required pin assignments missing
#error Missing pin assignments for configured RA DRIVER_TYPE_TMC2209_UART driver
#endif
Expand All @@ -225,12 +229,12 @@

#if (AZ_STEPPER_TYPE != STEPPER_TYPE_NONE)
#if (AZ_DRIVER_TYPE == DRIVER_TYPE_A4988_GENERIC) || (AZ_DRIVER_TYPE == DRIVER_TYPE_TMC2209_STANDALONE)
#if !defined(AZ_STEP_PIN) || !defined(AZ_DIR_PIN) || !defined(AZ_EN_PIN) || !defined(AZ_DIAG_PIN)
#if !defined(AZ_STEP_PIN) || !defined(AZ_DIR_PIN) || !defined(AZ_EN_PIN)
// Required pin assignments missing
#error Missing pin assignments for configured AZ DRIVER_TYPE_A4988_GENERIC or DRIVER_TYPE_TMC2209_STANDALONE driver
#endif
#elif (AZ_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
#if !defined(AZ_STEP_PIN) || !defined(AZ_DIR_PIN) || !defined(AZ_EN_PIN) || !defined(AZ_DIAG_PIN)
#if !defined(AZ_STEP_PIN) || !defined(AZ_DIR_PIN) || !defined(AZ_EN_PIN)
// Required pin assignments missing (ATmega uses SoftwareSerial for this driver)
#error Missing pin assignments for configured AZ DRIVER_TYPE_TMC2209_UART driver
#endif
Expand All @@ -243,12 +247,12 @@

#if (ALT_STEPPER_TYPE != STEPPER_TYPE_NONE)
#if (ALT_DRIVER_TYPE == DRIVER_TYPE_A4988_GENERIC) || (ALT_DRIVER_TYPE == DRIVER_TYPE_TMC2209_STANDALONE)
#if !defined(ALT_STEP_PIN) || !defined(ALT_DIR_PIN) || !defined(ALT_EN_PIN) || !defined(ALT_DIAG_PIN)
#if !defined(ALT_STEP_PIN) || !defined(ALT_DIR_PIN) || !defined(ALT_EN_PIN)
// Required pin assignments missing
#error Missing pin assignments for configured AZ DRIVER_TYPE_A4988_GENERIC or DRIVER_TYPE_TMC2209_STANDALONE driver
#endif
#elif (ALT_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
#if !defined(ALT_STEP_PIN) || !defined(ALT_DIR_PIN) || !defined(ALT_EN_PIN) || !defined(ALT_DIAG_PIN)
#if !defined(ALT_STEP_PIN) || !defined(ALT_DIR_PIN) || !defined(ALT_EN_PIN)
// Required pin assignments missing (ATmega uses SoftwareSerial for this driver)
#error Missing pin assignments for configured ALT DRIVER_TYPE_TMC2209_UART driver
#endif
Expand Down
91 changes: 56 additions & 35 deletions Configuration_adv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@
#define BUFFER_LOGS false
#endif

#ifndef OAM
#ifndef OAE
#define OAT "OAT"
#endif
#endif
#if defined(OAE) && defined(OAM)
#error "OAE and OAM cannot be defined at the same time"
#endif

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ////////
// MOTOR & DRIVER SETTINGS ////////
Expand Down Expand Up @@ -232,14 +241,14 @@
#endif

#ifndef DEC_LIMIT_UP
#ifdef OAM
#if defined(OAM) || defined(OAE)
#define DEC_LIMIT_UP 135.0f
#else
#define DEC_LIMIT_UP 0.0f
#endif
#endif
#ifndef DEC_LIMIT_DOWN
#ifdef OAM
#if defined(OAM) || defined(OAE)
#define DEC_LIMIT_DOWN 135.0f
#else
#define DEC_LIMIT_DOWN 0.0f
Expand Down Expand Up @@ -332,16 +341,34 @@
#define AZ_STEPPER_ACCELERATION (100 * AZ_MICROSTEPPING)
#endif

// the Circumference of the AZ rotation. 808mm dia.
// the Circumference of the AZ rotation. 808mm dia (OAT)
#ifndef AZ_CIRCUMFERENCE
#define AZ_CIRCUMFERENCE 2538.4f
#ifdef OAE
// Roughly from the joint to the rod placement is 70mm
#define AZ_CIRCUMFERENCE 56.0f * 2 * PI
#ifndef AZ_ROD_PITCH
#define AZ_ROD_PITCH 0.5
#endif
#define AZIMUTH_STEPS_PER_REV \
+(AZ_CORRECTION_FACTOR * (AZ_CIRCUMFERENCE / AZ_ROD_PITCH) * AZ_STEPPER_SPR * AZ_MICROSTEPPING) // Actually u-steps/rev
#else
#define AZ_CIRCUMFERENCE 2538.4f
#endif
#endif

#ifndef OAE
#define AZ_WORMGEAR_RATIO 1.0f
#endif

#ifndef AZIMUTH_STEPS_PER_REV
#define AZIMUTH_STEPS_PER_REV \
(AZ_CORRECTION_FACTOR * (AZ_CIRCUMFERENCE / (AZ_PULLEY_TEETH * GT2_BELT_PITCH)) * AZ_STEPPER_SPR \
* AZ_MICROSTEPPING) // Actually u-steps/rev
#endif
#define AZIMUTH_STEPS_PER_ARC_MINUTE (AZIMUTH_STEPS_PER_REV / (360 * 60.0f)) // Used to determine move distance in steps

#ifndef AZIMUTH_STEPS_PER_ARC_MINUTE
#define AZIMUTH_STEPS_PER_ARC_MINUTE (AZIMUTH_STEPS_PER_REV / (360 * 60.0f)) // Used to determine move distance in steps
#endif

// AZ TMC2209 UART settings
// These settings work only with TMC2209 in UART connection (single wire to TX)
Expand Down Expand Up @@ -373,7 +400,7 @@
#define ALT_MICROSTEPPING 4
#endif
#ifndef ALT_STEPPER_SPR
#define ALT_STEPPER_SPR 400 // NEMA 0.9° = 400 | NEMA 1.8° = 200
#define ALT_STEPPER_SPR (400.0) // NEMA 0.9° = 400 | NEMA 1.8° = 200
#endif
#ifndef ALT_STEPPER_SPEED
#define ALT_STEPPER_SPEED 2000
Expand All @@ -398,19 +425,30 @@
(ALT_CORRECTION_FACTOR * (ALT_CIRCUMFERENCE / ALT_ROD_PITCH) * ALT_STEPPER_SPR * ALT_MICROSTEPPING) // Actually u-steps/rev

#else
// the Circumference of the AZ rotation. 770mm dia.
#define ALT_CIRCUMFERENCE 2419.0f
#if AUTOPA_VERSION == 1
// the ratio of the ALT gearbox for AutoPA V1 (40:3)
#define ALT_WORMGEAR_RATIO (40.0f / 3.0f)
#else
// the ratio of the ALT gearbox for AutoPA V2 (40:1)
#define ALT_WORMGEAR_RATIO (40.0f)
#endif
#ifndef ALTITUDE_STEPS_PER_REV
#ifdef OAE
#ifndef ALT_ROD_PITCH
#define ALT_ROD_PITCH 1.25 // mm/rev
#endif
// the Circumference of the ALT rotation. Roughly 146mm radius.
#define ALT_CIRCUMFERENCE 130.0f * 2 * PI
#define ALTITUDE_STEPS_PER_REV \
(ALT_CORRECTION_FACTOR * (ALT_CIRCUMFERENCE / (ALT_PULLEY_TEETH * GT2_BELT_PITCH)) * ALT_STEPPER_SPR * ALT_MICROSTEPPING \
* ALT_WORMGEAR_RATIO) // Actually u-steps/rev
+(ALT_CORRECTION_FACTOR * (ALT_CIRCUMFERENCE / ALT_ROD_PITCH) * ALT_STEPPER_SPR \
* ALT_MICROSTEPPING) // Actually u-steps/rev
#else
// the Circumference of the AZ rotation. 770mm dia.
#define ALT_CIRCUMFERENCE 2419.0f
#if AUTOPA_VERSION == 1
// the ratio of the ALT gearbox for AutoPA V1 (40:3)
#define ALT_WORMGEAR_RATIO (40.0f / 3.0f)
#else
// the ratio of the ALT gearbox for AutoPA V2 (40:1)
#define ALT_WORMGEAR_RATIO (40.0f)
#endif
#ifndef ALTITUDE_STEPS_PER_REV
#define ALTITUDE_STEPS_PER_REV \
(ALT_CORRECTION_FACTOR * (ALT_CIRCUMFERENCE / (ALT_PULLEY_TEETH * GT2_BELT_PITCH)) * ALT_STEPPER_SPR \
* ALT_MICROSTEPPING * ALT_WORMGEAR_RATIO) // Actually u-steps/rev
#endif
#endif
#endif

Expand Down Expand Up @@ -620,23 +658,6 @@
// ////////
////////////////////////////////////////////

// Stepper drivers
#if (RA_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
#if defined(ESP32)
#define RA_SERIAL_PORT Serial2 // Can be shared with DEC_SERIAL_PORT
#elif defined(__AVR_ATmega2560__)
// Uses SoftwareSerial
#endif
#endif

#if (DEC_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
#if defined(ESP32)
#define DEC_SERIAL_PORT Serial2 // Can be shared with RA_SERIAL_PORT
#elif defined(__AVR_ATmega2560__)
// Uses SoftwareSerial
#endif
#endif

// Focuser
#if (FOCUS_DRIVER_TYPE == DRIVER_TYPE_TMC2209_UART)
#if defined(ESP32)
Expand Down
1 change: 1 addition & 0 deletions Constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

// ESP32 based boards
#define BOARD_ESP32_ESP32DEV 1001
#define BOARD_OAE_V1 1002

/**
* Supported keypad/display types. Use one of these values for DISPLAY_TYPE configuration matching your used display and keypad.
Expand Down
2 changes: 2 additions & 0 deletions LocalConfiguration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include "Configuration_local_mksgenlv1.hpp"
#elif BOARD == BOARD_ESP32_ESP32DEV && __has_include("Configuration_local_esp32dev.hpp")
#include "Configuration_local_esp32dev.hpp"
#elif BOARD == BOARD_OAE_V1 && __has_include("Configuration_local_oae.hpp")
#include "Configuration_local_oae.hpp"
#elif __has_include("Configuration_local.hpp")
#include "Configuration_local.hpp"
#endif
2 changes: 1 addition & 1 deletion Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// Also, numbers are interpreted as simple numbers. _ __ _
// So 1.8 is actually 1.08, meaning that 1.12 is a later version than 1.8. \_(..)_/

#define VERSION "V1.13.16"
#define VERSION "V1.13.18"
Loading
Loading