mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-09-01 18:32:37 +02:00
@@ -20,7 +20,7 @@
|
||||
|
||||
// Grbl versioning system
|
||||
#define GRBL_VERSION "1.1f"
|
||||
#define GRBL_VERSION_BUILD "20190602"
|
||||
#define GRBL_VERSION_BUILD "20190616"
|
||||
|
||||
//#include <sdkconfig.h>
|
||||
#include <Arduino.h>
|
||||
|
@@ -23,6 +23,8 @@
|
||||
|
||||
#ifdef USE_PEN_SERVO
|
||||
|
||||
static TaskHandle_t servoSyncTaskHandle = 0;
|
||||
|
||||
// used to delay turn on
|
||||
bool servo_pen_enable = false;
|
||||
|
||||
|
@@ -67,8 +67,6 @@
|
||||
#ifndef servo_h
|
||||
#define servo_h
|
||||
|
||||
static TaskHandle_t servoSyncTaskHandle = 0;
|
||||
|
||||
void servo_init();
|
||||
void servo_disable();
|
||||
bool validate_servo_settings(bool verbose);
|
||||
|
@@ -23,6 +23,8 @@
|
||||
|
||||
#ifdef USE_PEN_SOLENOID
|
||||
|
||||
static TaskHandle_t solenoidSyncTaskHandle = 0;
|
||||
|
||||
// used to delay turn on
|
||||
bool solenoid_pen_enable;
|
||||
uint16_t solenoide_hold_count;
|
||||
|
@@ -46,7 +46,7 @@
|
||||
|
||||
#ifndef solenoid_h
|
||||
#define solenoid_h
|
||||
static TaskHandle_t solenoidSyncTaskHandle = 0;
|
||||
|
||||
void solenoid_init();
|
||||
void solenoid_disable();
|
||||
void solenoidSyncTask(void *pvParameters);
|
||||
|
@@ -198,6 +198,58 @@ static st_prep_t prep;
|
||||
|
||||
|
||||
*/
|
||||
|
||||
#ifdef USE_RMT_STEPS
|
||||
// Set stepper pulse output pins
|
||||
inline IRAM_ATTR static void stepperRMT_Outputs()
|
||||
{
|
||||
|
||||
#ifdef X_STEP_PIN
|
||||
if(st.step_outbits & (1<<X_AXIS)) {
|
||||
#ifndef X_STEP_B_PIN // if not a ganged axis
|
||||
RMT.conf_ch[X_RMT_CHANNEL].conf1.mem_rd_rst = 1;
|
||||
RMT.conf_ch[X_RMT_CHANNEL].conf1.tx_start = 1;
|
||||
#else // it is a ganged axis
|
||||
if ( (ganged_mode == SQUARING_MODE_DUAL) || (ganged_mode == SQUARING_MODE_A) ) {
|
||||
RMT.conf_ch[X_RMT_CHANNEL].conf1.mem_rd_rst = 1;
|
||||
RMT.conf_ch[X_RMT_CHANNEL].conf1.tx_start = 1; }
|
||||
|
||||
if ( (ganged_mode == SQUARING_MODE_DUAL) || (ganged_mode == SQUARING_MODE_B) ) {
|
||||
RMT.conf_ch[X_B_RMT_CHANNEL].conf1.mem_rd_rst = 1;
|
||||
RMT.conf_ch[X_B_RMT_CHANNEL].conf1.tx_start = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef Y_STEP_PIN
|
||||
if(st.step_outbits & (1<<Y_AXIS)) {
|
||||
#ifndef Y_STEP_B_PIN // if not a ganged axis
|
||||
RMT.conf_ch[Y_RMT_CHANNEL].conf1.mem_rd_rst = 1;
|
||||
RMT.conf_ch[Y_RMT_CHANNEL].conf1.tx_start = 1;
|
||||
#else // it is a ganged axis
|
||||
if ( (ganged_mode == SQUARING_MODE_DUAL) || (ganged_mode == SQUARING_MODE_A) ) {
|
||||
RMT.conf_ch[Y_RMT_CHANNEL].conf1.mem_rd_rst = 1;
|
||||
RMT.conf_ch[Y_RMT_CHANNEL].conf1.tx_start = 1;
|
||||
}
|
||||
if ( (ganged_mode == SQUARING_MODE_DUAL) || (ganged_mode == SQUARING_MODE_B) ) {
|
||||
RMT.conf_ch[Y_B_RMT_CHANNEL].conf1.mem_rd_rst = 1;
|
||||
RMT.conf_ch[Y_B_RMT_CHANNEL].conf1.tx_start = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef Z_STEP_PIN
|
||||
if(st.step_outbits & (1<<Z_AXIS)) {
|
||||
RMT.conf_ch[Z_RMT_CHANNEL].conf1.mem_rd_rst = 1;
|
||||
RMT.conf_ch[Z_RMT_CHANNEL].conf1.tx_start = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
// TODO: Replace direct updating of the int32 position counters in the ISR somehow. Perhaps use smaller
|
||||
// int8 variables and update position counters only when a segment completes. This can get complicated
|
||||
// with probing and homing cycles that require true real-time positions.
|
||||
@@ -670,57 +722,6 @@ void set_stepper_pins_on(uint8_t onMask)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_RMT_STEPS
|
||||
// Set stepper pulse output pins
|
||||
inline IRAM_ATTR static void stepperRMT_Outputs()
|
||||
{
|
||||
|
||||
#ifdef X_STEP_PIN
|
||||
if(st.step_outbits & (1<<X_AXIS)) {
|
||||
#ifndef X_STEP_B_PIN // if not a ganged axis
|
||||
RMT.conf_ch[X_RMT_CHANNEL].conf1.mem_rd_rst = 1;
|
||||
RMT.conf_ch[X_RMT_CHANNEL].conf1.tx_start = 1;
|
||||
#else // it is a ganged axis
|
||||
if ( (ganged_mode == SQUARING_MODE_DUAL) || (ganged_mode == SQUARING_MODE_A) ) {
|
||||
RMT.conf_ch[X_RMT_CHANNEL].conf1.mem_rd_rst = 1;
|
||||
RMT.conf_ch[X_RMT_CHANNEL].conf1.tx_start = 1; }
|
||||
|
||||
if ( (ganged_mode == SQUARING_MODE_DUAL) || (ganged_mode == SQUARING_MODE_B) ) {
|
||||
RMT.conf_ch[X_B_RMT_CHANNEL].conf1.mem_rd_rst = 1;
|
||||
RMT.conf_ch[X_B_RMT_CHANNEL].conf1.tx_start = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef Y_STEP_PIN
|
||||
if(st.step_outbits & (1<<Y_AXIS)) {
|
||||
#ifndef Y_STEP_B_PIN // if not a ganged axis
|
||||
RMT.conf_ch[Y_RMT_CHANNEL].conf1.mem_rd_rst = 1;
|
||||
RMT.conf_ch[Y_RMT_CHANNEL].conf1.tx_start = 1;
|
||||
#else // it is a ganged axis
|
||||
if ( (ganged_mode == SQUARING_MODE_DUAL) || (ganged_mode == SQUARING_MODE_A) ) {
|
||||
RMT.conf_ch[Y_RMT_CHANNEL].conf1.mem_rd_rst = 1;
|
||||
RMT.conf_ch[Y_RMT_CHANNEL].conf1.tx_start = 1;
|
||||
}
|
||||
if ( (ganged_mode == SQUARING_MODE_DUAL) || (ganged_mode == SQUARING_MODE_B) ) {
|
||||
RMT.conf_ch[Y_B_RMT_CHANNEL].conf1.mem_rd_rst = 1;
|
||||
RMT.conf_ch[Y_B_RMT_CHANNEL].conf1.tx_start = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef Z_STEP_PIN
|
||||
if(st.step_outbits & (1<<Z_AXIS)) {
|
||||
RMT.conf_ch[Z_RMT_CHANNEL].conf1.mem_rd_rst = 1;
|
||||
RMT.conf_ch[Z_RMT_CHANNEL].conf1.tx_start = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
// Stepper shutdown
|
||||
void st_go_idle()
|
||||
{
|
||||
|
@@ -83,7 +83,6 @@ void IRAM_ATTR onSteppertimer();
|
||||
void IRAM_ATTR onStepperOffTimer();
|
||||
void stepper_init();
|
||||
void initRMT();
|
||||
inline IRAM_ATTR static void stepperRMT_Outputs();
|
||||
|
||||
// Enable steppers, but cycle does not start unless called by motion control or realtime command.
|
||||
void st_wake_up();
|
||||
|
@@ -6,7 +6,7 @@
|
||||
|
||||
### Project Overview
|
||||
|
||||
[](https://travis-ci.org/bdring/Grbl_Esp32)
|
||||
[](https://travis-ci.com/odaki/Grbl_Esp32)
|
||||
|
||||
This is a port of [Grbl](https://github.com/gnea/grbl) for the ESP32. The ESP32 is potentially a great target for Grbl for the following reasons
|
||||
|
||||
@@ -54,4 +54,3 @@ Start asking questions...I'll put the frequent ones here.
|
||||
This project requires a lot of work and often expensive items for testing. Please consider a safe, secure and highly appreciated donation via the PayPal link below.
|
||||
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=TKNJ9Z775VXB2)
|
||||
|
||||
|
Reference in New Issue
Block a user