1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-03 11:22:38 +02:00

Updates for Low Rider Machine

- Cleaned up lowrider cpu_map
- added auto squaring of z-axis to stepper .cpp
This commit is contained in:
bdring
2019-05-07 10:37:10 -05:00
parent a7b71d25d3
commit 31af2eae1a
2 changed files with 20 additions and 10 deletions

View File

@@ -759,26 +759,26 @@
#ifdef CPU_MAP_LOWRIDER // !!!!!!!!!!!!!!!!! Warning: Untested !!!!!!!!!!!!!!!!! //
// This is the CPU Map for the Buildlog.net MPCNC controller
// used in lowrider mode. Low rider has (2) Z and one each of X and Y
// used in lowrider mode. Low rider has (2) Y and Z and one X motor
// These will not match the silkscreen or schematic descriptions
#define CPU_MAP_NAME "CPU_MAP_LOWRIDER"
#define USE_GANGED_AXES // allow two motors on an axis
#define X_STEP_PIN GPIO_NUM_27 // use Z labeled connector
#define X_STEP_PIN GPIO_NUM_27 // use Z labeled connector
#define X_DIRECTION_PIN GPIO_NUM_33 // use Z labeled connector
#define Y_STEP_PIN GPIO_NUM_14
#define Y_STEP_B_PIN GPIO_NUM_21 // ganged motor
#define Y_STEP_B_PIN GPIO_NUM_21 // ganged motor
#define Y_DIRECTION_PIN GPIO_NUM_25
#define Y_AXIS_SQUARING
#define Z_STEP_PIN GPIO_NUM_12
#define Z_STEP_B_PIN GPIO_NUM_22
#define Z_STEP_PIN GPIO_NUM_12 // use X labeled connector
#define Z_STEP_B_PIN GPIO_NUM_22 // use X labeled connector
#define Z_DIRECTION_PIN GPIO_NUM_26 // use X labeled connector
#define Z_AXIS_SQUARING
#define X_DIRECTION_PIN GPIO_NUM_33 // use Z labeled connector
#define Y_DIRECTION_PIN GPIO_NUM_25
#define Z_DIRECTION_PIN GPIO_NUM_26 // use X labeled connector
// OK to comment out to use pin for other features
#define STEPPERS_DISABLE_PIN GPIO_NUM_13

View File

@@ -646,11 +646,21 @@ void set_stepper_pins_on(uint8_t onMask)
#endif
#endif
// ganged z not supported yet
#ifdef Z_STEP_PIN
#ifndef Z_STEP_B_PIN // if not a ganged axis
digitalWrite(Z_STEP_PIN, (onMask & (1<<Z_AXIS)));
#else // is a ganged axis
if ( (ganged_mode == SQUARING_MODE_DUAL) || (ganged_mode == SQUARING_MODE_A) ) {
digitalWrite(Z_STEP_PIN, (onMask & (1<<Z_AXIS)));
}
if ( (ganged_mode == SQUARING_MODE_DUAL) || (ganged_mode == SQUARING_MODE_B) ) {
digitalWrite(Z_STEP_B_PIN, (onMask & (1<<Z_AXIS)));
}
#endif
#endif
}
#endif