diff --git a/platformio.ini b/platformio.ini index c933fb4..4e0448e 100644 --- a/platformio.ini +++ b/platformio.ini @@ -52,4 +52,5 @@ build_flags = [env:esp32] platform = espressif32 board = esp-wrover-kit -build_flags = -D MCU_ESP32 \ No newline at end of file +build_flags = -D MCU_ESP32 +monitor_filters = esp32_exception_decoder \ No newline at end of file diff --git a/src/boards.h b/src/boards.h index 968db0d..60cf1e0 100644 --- a/src/boards.h +++ b/src/boards.h @@ -8,7 +8,7 @@ #elif defined(MCU_PICO) #define BOARD_CUSTOM_PICO #elif defined(MCU_ESP32) - #define BOARD_CUSTOM + #define BOARD_CUSTOM_ESP32 #else #error "Invalid build config - must specify MCU type" #endif @@ -50,11 +50,11 @@ #define ENDSTOPS_PULLUPS true #define WIRING_ENDSTOPS_MIN {A0,A1,A2} #define WIRING_ENDSTOPS_MAX {A3,A4,A5} -#else - #define BOARD_STRING "Custom board" - #define WIRING_MOTOR_X 13, 12, 11, 10 - #define WIRING_MOTOR_Y 9, 8, 7, 6 - #define WIRING_MOTOR_Z 5, 4, 3, 2 +#elif defined(BOARD_CUSTOM_ESP32) + #define BOARD_STRING "Custom ESP32 board" + #define WIRING_MOTOR_X 34, 32, 25, 27 + #define WIRING_MOTOR_Y 12, 13, 14, 26 + #define WIRING_MOTOR_Z 23, 35, 18, 5 #define ENDSTOPS_INVERT false #define ENDSTOPS_PULLUPS true #define WIRING_ENDSTOPS_MIN {A0,A1,A2} diff --git a/src/modules/stage/stage.cpp b/src/modules/stage/stage.cpp index ab2f067..313fb30 100644 --- a/src/modules/stage/stage.cpp +++ b/src/modules/stage/stage.cpp @@ -10,7 +10,7 @@ #include "main.h" // The array below has 3 stepper objects, for X,Y,Z respectively -const uint8_t n_motors = 3; +const uint8_t n_motors = STAGE_N_MOTORS; long min_step_delay = -1; const uint8_t min_step_delay_eeprom = sizeof(long) * n_motors; long ramp_time = -1;