1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-02 19:02:35 +02:00
This commit is contained in:
bdring
2020-11-30 10:29:20 -06:00
parent 4859b952b1
commit 5f95a5a763
5 changed files with 29 additions and 31 deletions

View File

@@ -77,19 +77,19 @@ void user_machine_init() {
tool[1].mpos[X_AXIS] = 151.0; tool[1].mpos[X_AXIS] = 151.0;
tool[1].mpos[Y_AXIS] = 291.0; tool[1].mpos[Y_AXIS] = 291.0;
tool[1].mpos[Z_AXIS] = -86.0; tool[1].mpos[Z_AXIS] = -87.0;
tool[2].mpos[X_AXIS] = 186.0; tool[2].mpos[X_AXIS] = 186.0;
tool[2].mpos[Y_AXIS] = 291.0; tool[2].mpos[Y_AXIS] = 291.0;
tool[2].mpos[Z_AXIS] = -86.0; tool[2].mpos[Z_AXIS] = -87.0;
tool[3].mpos[X_AXIS] = 221.0; tool[3].mpos[X_AXIS] = 221.0;
tool[3].mpos[Y_AXIS] = 292.0; tool[3].mpos[Y_AXIS] = 292.0;
tool[3].mpos[Z_AXIS] = -86.0; tool[3].mpos[Z_AXIS] = -87.0;
tool[4].mpos[X_AXIS] = 256.0; tool[4].mpos[X_AXIS] = 256.0;
tool[4].mpos[Y_AXIS] = 291.0; tool[4].mpos[Y_AXIS] = 291.0;
tool[4].mpos[Z_AXIS] = -86.0; tool[4].mpos[Z_AXIS] = -87.0;
top_of_z = limitsMaxPosition(Z_AXIS) - homing_pulloff->get(); top_of_z = limitsMaxPosition(Z_AXIS) - homing_pulloff->get();
} }
@@ -320,7 +320,7 @@ bool set_ATC_open(bool open) {
// give a squirt of air to clear top of Tool Setter // give a squirt of air to clear top of Tool Setter
bool atc_ETS_dustoff() { bool atc_ETS_dustoff() {
digitalWrite(ETS_DUST_OFF, HIGH); digitalWrite(ETS_DUST_OFF, HIGH);
gc_exec_linef(true, "G4P%0.2f", 0.250); gc_exec_linef(true, "G4P%0.2f", ETS_DUST_OFF_DURATION);
digitalWrite(ETS_DUST_OFF, LOW); digitalWrite(ETS_DUST_OFF, LOW);
} }

View File

@@ -98,7 +98,7 @@ const int MAX_N_AXIS = 6;
//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

View File

@@ -105,21 +105,20 @@
//#define SPINDLE_OUTPUT_PIN GPIO_NUM_14 // relay as spindle on module socket #2 //#define SPINDLE_OUTPUT_PIN GPIO_NUM_14 // relay as spindle on module socket #2
#define DEFAULT_SPINDLE_DELAY_SPINUP 2.25
#define DEFAULT_SPINDLE_DELAY_SPINDOWN 6.0
// //
#define ETS_DUST_OFF_DURATION .30 // seconds
#define ATC_MANUAL_CHANGE_TIME 500 // milliseconds ATC is open #define ATC_MANUAL_CHANGE_TIME 500 // milliseconds ATC is open
// ================= Setting Defaults ========================== // ================= Setting Defaults ==========================
#define DEFAULT_X_STEPS_PER_MM 160 #define DEFAULT_X_STEPS_PER_MM 160
#define DEFAULT_Y_STEPS_PER_MM 160 #define DEFAULT_Y_STEPS_PER_MM 160
#define DEFAULT_Z_STEPS_PER_MM 755.904 #define DEFAULT_Z_STEPS_PER_MM 1511.808
#define DEFAULT_X_MAX_RATE 2000 #define DEFAULT_X_MAX_RATE 6000
#define DEFAULT_Y_MAX_RATE 2000 #define DEFAULT_Y_MAX_RATE 6000
#define DEFAULT_Z_MAX_RATE 2000 #define DEFAULT_Z_MAX_RATE 1500
#define DEFAULT_X_HOMING_MPOS 0 #define DEFAULT_X_HOMING_MPOS 0
#define DEFAULT_X_MAX_TRAVEL 400 #define DEFAULT_X_MAX_TRAVEL 400
@@ -135,19 +134,22 @@
#define DEFAULT_Z_MAX_TRAVEL 200 #define DEFAULT_Z_MAX_TRAVEL 200
#define DEFAULT_Z_CURRENT 1.0 #define DEFAULT_Z_CURRENT 1.0
#define DEFAULT_Z_HOLD_CURRENT 0.25 #define DEFAULT_Z_HOLD_CURRENT 0.25
#define DEFAULT_Z_ACCELERATION 100.00
#define DEFAULT_X_MICROSTEPS 32 #define DEFAULT_X_MICROSTEPS 32
#define DEFAULT_Y_MICROSTEPS 32 #define DEFAULT_Y_MICROSTEPS 32
#define DEFAULT_Z_MICROSTEPS 32 #define DEFAULT_Z_MICROSTEPS 16
#define DEFAULT_HOMING_DIR_MASK (bit(X_AXIS) | bit(Y_AXIS)) #define DEFAULT_HOMING_ENABLE 1
#define DEFAULT_HOMING_DIR_MASK (bit(X_AXIS) | bit(Y_AXIS))
#define DEFAULT_HOMING_ENABLE 1 #define DEFAULT_HOMING_SEEK_RATE 3500
#define DEFAULT_HOMING_PULLOFF 3.0
#define DEFAULT_HOMING_CYCLE_0 bit(Z_AXIS)
#define DEFAULT_HOMING_CYCLE_1 bit(X_AXIS)
#define DEFAULT_HOMING_CYCLE_2 bit(Y_AXIS)
#define DEFAULT_DIRECTION_INVERT_MASK (bit(Y_AXIS) | bit(Z_AXIS))
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 255 #define DEFAULT_STEPPER_IDLE_LOCK_TIME 255
#define DEFAULT_HOMING_CYCLE_0 bit(Z_AXIS) #define DEFAULT_SPINDLE_DELAY_SPINUP 2.0
#define DEFAULT_HOMING_CYCLE_1 bit(X_AXIS) #define DEFAULT_SPINDLE_DELAY_SPINDOWN 6.0
#define DEFAULT_HOMING_CYCLE_2 bit(Y_AXIS)
#define DEFAULT_HOMING_SEEK_RATE 3500

View File

@@ -497,7 +497,7 @@ Error EnumSetting::setStringValue(char* s) {
} }
_currentValue = it->second; _currentValue = it->second;
if (_storedValue != _currentValue) { if (_storedValue != _currentValue) {
if (_storedValue == _defaultValue) { if (_currentValue == _defaultValue) {
nvs_erase_key(_handle, _keyName); nvs_erase_key(_handle, _keyName);
} else { } else {
if (nvs_set_i8(_handle, _keyName, _currentValue)) { if (nvs_set_i8(_handle, _keyName, _currentValue)) {

View File

@@ -155,22 +155,18 @@ namespace Spindles {
return; // Block during abort. return; // Block during abort.
} }
if (_current_state == SpindleState::Disable) { // Halt or set spindle direction and rpm. if (state == SpindleState::Disable) { // Halt or set spindle direction and rpm.
sys.spindle_speed = 0; sys.spindle_speed = 0;
stop(); stop();
if (use_delays && (_current_state != state)) { if (use_delays && (_current_state != state)) {
//grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "SpinDown Start ");
mc_dwell(spindle_delay_spindown->get()); mc_dwell(spindle_delay_spindown->get());
//grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "SpinDown Done");
} }
} else { } else {
set_dir_pin(_current_state == SpindleState::Cw); set_dir_pin(state == SpindleState::Cw);
set_rpm(rpm); set_rpm(rpm);
set_enable_pin(_current_state != SpindleState::Disable); // must be done after setting rpm for enable features to work set_enable_pin(state != SpindleState::Disable); // must be done after setting rpm for enable features to work
if (use_delays && (_current_state != state)) { if (use_delays && (_current_state != state)) {
//grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "SpinUp Start %d", rpm);
mc_dwell(spindle_delay_spinup->get()); mc_dwell(spindle_delay_spinup->get());
//grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "SpinUp Done");
} }
} }