mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-09-02 10:53:01 +02:00
WIP
This commit is contained in:
@@ -96,11 +96,11 @@ const int MAX_N_AXIS = 6;
|
|||||||
//#define CONNECT_TO_SSID "your SSID"
|
//#define CONNECT_TO_SSID "your SSID"
|
||||||
//#define SSID_PASSWORD "your SSID password"
|
//#define SSID_PASSWORD "your SSID password"
|
||||||
//CONFIGURE_EYECATCH_BEGIN (DO NOT MODIFY THIS LINE)
|
//CONFIGURE_EYECATCH_BEGIN (DO NOT MODIFY THIS LINE)
|
||||||
#define ENABLE_BLUETOOTH // enable bluetooth
|
//#define ENABLE_BLUETOOTH // enable bluetooth
|
||||||
|
|
||||||
#define ENABLE_SD_CARD // enable use of SD Card to run jobs
|
#define ENABLE_SD_CARD // enable use of SD Card to run jobs
|
||||||
|
|
||||||
#define ENABLE_WIFI //enable wifi
|
//#define ENABLE_WIFI //enable wifi
|
||||||
|
|
||||||
#if defined(ENABLE_WIFI) || defined(ENABLE_BLUETOOTH)
|
#if defined(ENABLE_WIFI) || defined(ENABLE_BLUETOOTH)
|
||||||
# define WIFI_OR_BLUETOOTH
|
# define WIFI_OR_BLUETOOTH
|
||||||
|
@@ -175,7 +175,7 @@ void limits_go_home(uint8_t cycle_mask) {
|
|||||||
sys.homing_axis_lock = axislock;
|
sys.homing_axis_lock = axislock;
|
||||||
// Perform homing cycle. Planner buffer should be empty, as required to initiate the homing cycle.
|
// Perform homing cycle. Planner buffer should be empty, as required to initiate the homing cycle.
|
||||||
pl_data->feed_rate = homing_rate; // Set current homing rate.
|
pl_data->feed_rate = homing_rate; // Set current homing rate.
|
||||||
plan_buffer_line(target, pl_data); // Bypass mc_line(). Directly plan homing motion.
|
plan_buffer_line(target, pl_data); // Bypass mcline(). Directly plan homing motion.
|
||||||
sys.step_control = STEP_CONTROL_EXECUTE_SYS_MOTION; // Set to execute homing motion and clear existing flags.
|
sys.step_control = STEP_CONTROL_EXECUTE_SYS_MOTION; // Set to execute homing motion and clear existing flags.
|
||||||
st_prep_buffer(); // Prep and fill segment buffer from newly planned block.
|
st_prep_buffer(); // Prep and fill segment buffer from newly planned block.
|
||||||
st_wake_up(); // Initiate motion
|
st_wake_up(); // Initiate motion
|
||||||
@@ -392,7 +392,7 @@ uint8_t limits_get_state() {
|
|||||||
return pinMask;
|
return pinMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Performs a soft limit check. Called from mc_line() only. Assumes the machine has been homed,
|
// Performs a soft limit check. Called from mcline() only. Assumes the machine has been homed,
|
||||||
// the workspace volume is in all negative space, and the system is in normal operation.
|
// the workspace volume is in all negative space, and the system is in normal operation.
|
||||||
// NOTE: Used by jogging to limit travel within soft-limit volume.
|
// NOTE: Used by jogging to limit travel within soft-limit volume.
|
||||||
void limits_soft_check(float* target) {
|
void limits_soft_check(float* target) {
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define MACHINE_NAME "Tapster Pro Delta 6P Trinamic"
|
#define MACHINE_NAME "Tapster Pro Delta 6P Trinamic"
|
||||||
|
|
||||||
#define CUSTOM_CODE_FILENAME "Custom/parallel_delta.cpp"
|
#define CUSTOM_CODE_FILENAME "Custom/parallel_delta.cpp"
|
||||||
/*
|
/*
|
||||||
// enable these special machine functions to be called from the main program
|
// enable these special machine functions to be called from the main program
|
||||||
@@ -108,11 +107,17 @@
|
|||||||
#define Z_CS_PIN I2SO(11)
|
#define Z_CS_PIN I2SO(11)
|
||||||
#define Z_RSENSE X_RSENSE
|
#define Z_RSENSE X_RSENSE
|
||||||
|
|
||||||
// 4x Switch input module on CNC I/O module Socket #1
|
// // 4x Switch input module on CNC I/O module Socket #1
|
||||||
|
// // https://github.com/bdring/6-Pack_CNC_Controller/wiki/4x-Switch-Input-module
|
||||||
|
// #define X_LIMIT_PIN GPIO_NUM_33
|
||||||
|
// #define Y_LIMIT_PIN GPIO_NUM_32
|
||||||
|
// #define Z_LIMIT_PIN GPIO_NUM_35
|
||||||
|
|
||||||
|
// 4x Switch input module on CNC I/O module Socket #2
|
||||||
// https://github.com/bdring/6-Pack_CNC_Controller/wiki/4x-Switch-Input-module
|
// https://github.com/bdring/6-Pack_CNC_Controller/wiki/4x-Switch-Input-module
|
||||||
#define X_LIMIT_PIN GPIO_NUM_33
|
#define X_LIMIT_PIN GPIO_NUM_2
|
||||||
#define Y_LIMIT_PIN GPIO_NUM_32
|
#define Y_LIMIT_PIN GPIO_NUM_25
|
||||||
#define Z_LIMIT_PIN GPIO_NUM_35
|
#define Z_LIMIT_PIN GPIO_NUM_39
|
||||||
|
|
||||||
//Example Quad MOSFET module on socket #5
|
//Example Quad MOSFET module on socket #5
|
||||||
// https://github.com/bdring/6-Pack_CNC_Controller/wiki/Quad-MOSFET-Module
|
// https://github.com/bdring/6-Pack_CNC_Controller/wiki/Quad-MOSFET-Module
|
||||||
@@ -154,7 +159,7 @@
|
|||||||
#define DEFAULT_HOMING_DIR_MASK (bit(X_AXIS) | bit(Y_AXIS) | bit(Z_AXIS)) // all axes home negative
|
#define DEFAULT_HOMING_DIR_MASK (bit(X_AXIS) | bit(Y_AXIS) | bit(Z_AXIS)) // all axes home negative
|
||||||
#define DEFAULT_HOMING_ENABLE 1
|
#define DEFAULT_HOMING_ENABLE 1
|
||||||
#define DEFAULT_INVERT_LIMIT_PINS 0
|
#define DEFAULT_INVERT_LIMIT_PINS 0
|
||||||
#define DEFAULT_HOMING_CYCLE_0 #define DEFAULT_HOMING_CYCLE_0 (bit(X_AXIS) | bit(Y_AXIS) | bit(Y_AXIS))
|
#define DEFAULT_HOMING_CYCLE_0 (bit(X_AXIS) | bit(Y_AXIS) | bit(Z_AXIS))
|
||||||
#define DEFAULT_HOMING_CYCLE_1 0 // override this one in defaults.h
|
#define DEFAULT_HOMING_CYCLE_1 0 // override this one in defaults.h
|
||||||
|
|
||||||
// The machine homes up and above center. MPos is the axis angle in radians
|
// The machine homes up and above center. MPos is the axis angle in radians
|
||||||
|
@@ -35,6 +35,7 @@ SquaringMode ganged_mode = SquaringMode::Dual;
|
|||||||
|
|
||||||
// this allows kinematics to be used.
|
// this allows kinematics to be used.
|
||||||
void mc_line_kins(float* target, plan_line_data_t* pl_data, float* position) {
|
void mc_line_kins(float* target, plan_line_data_t* pl_data, float* position) {
|
||||||
|
grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "mc_line_kins");
|
||||||
#ifndef USE_KINEMATICS
|
#ifndef USE_KINEMATICS
|
||||||
mc_line(target, pl_data);
|
mc_line(target, pl_data);
|
||||||
#else // else use kinematics
|
#else // else use kinematics
|
||||||
@@ -52,6 +53,9 @@ void mc_line_kins(float* target, plan_line_data_t* pl_data, float* position) {
|
|||||||
void mc_line(float* target, plan_line_data_t* pl_data) {
|
void mc_line(float* target, plan_line_data_t* pl_data) {
|
||||||
// If enabled, check for soft limit violations. Placed here all line motions are picked up
|
// If enabled, check for soft limit violations. Placed here all line motions are picked up
|
||||||
// from everywhere in Grbl.
|
// from everywhere in Grbl.
|
||||||
|
throw "foo";
|
||||||
|
|
||||||
|
grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "mc_line");
|
||||||
if (soft_limits->get()) {
|
if (soft_limits->get()) {
|
||||||
// NOTE: Block jog state. Jogging is a special case and soft limits are handled independently.
|
// NOTE: Block jog state. Jogging is a special case and soft limits are handled independently.
|
||||||
if (sys.state != State::Jog) {
|
if (sys.state != State::Jog) {
|
||||||
@@ -384,7 +388,8 @@ GCUpdatePos mc_probe_cycle(float* target, plan_line_data_t* pl_data, uint8_t par
|
|||||||
return GCUpdatePos::None; // Nothing else to do but bail.
|
return GCUpdatePos::None; // Nothing else to do but bail.
|
||||||
}
|
}
|
||||||
// Setup and queue probing motion. Auto cycle-start should not start the cycle.
|
// Setup and queue probing motion. Auto cycle-start should not start the cycle.
|
||||||
mc_line(target, pl_data);
|
grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "Found");
|
||||||
|
mc_line_kins(target, pl_data, gc_state.position);
|
||||||
// Activate the probing state monitor in the stepper module.
|
// Activate the probing state monitor in the stepper module.
|
||||||
sys_probe_state = PROBE_ACTIVE;
|
sys_probe_state = PROBE_ACTIVE;
|
||||||
// Perform probing cycle. Wait here until probe is triggered or motion completes.
|
// Perform probing cycle. Wait here until probe is triggered or motion completes.
|
||||||
|
@@ -28,6 +28,7 @@ build_flags =
|
|||||||
-DCORE_DEBUG_LEVEL=0
|
-DCORE_DEBUG_LEVEL=0
|
||||||
-Wno-unused-variable
|
-Wno-unused-variable
|
||||||
-Wno-unused-function
|
-Wno-unused-function
|
||||||
|
-O0
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
lib_deps =
|
lib_deps =
|
||||||
|
Reference in New Issue
Block a user