mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-09-03 19:32:39 +02:00
minor changes and soft limit debugging.
This commit is contained in:
@@ -75,7 +75,7 @@ uint32_t DacSpindle::set_rpm(uint32_t rpm) {
|
||||
pwm_value = 255;
|
||||
} else if (rpm <= _min_rpm) {
|
||||
if (rpm == 0.0) { // S0 disables spindle
|
||||
sys.spindle_speed = 0.0;
|
||||
sys.spindle_speed = 0;
|
||||
pwm_value = 0;
|
||||
} else { // Set minimum PWM output
|
||||
rpm = _min_rpm;
|
||||
|
@@ -146,7 +146,7 @@ void HuanyangSpindle :: set_state(uint8_t state, uint32_t rpm) {
|
||||
}
|
||||
|
||||
if (state == SPINDLE_DISABLE) {
|
||||
sys.spindle_speed = 0.0;
|
||||
sys.spindle_speed = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -144,7 +144,7 @@ void PWMSpindle::set_state(uint8_t state, uint32_t rpm) {
|
||||
return; // Block during abort.
|
||||
|
||||
if (state == SPINDLE_DISABLE) { // Halt or set spindle direction and rpm.
|
||||
sys.spindle_speed = 0.0;
|
||||
sys.spindle_speed = 0;
|
||||
stop();
|
||||
} else {
|
||||
set_spindle_dir_pin(state == SPINDLE_ENABLE_CW);
|
||||
|
@@ -55,7 +55,7 @@ uint32_t RelaySpindle::set_rpm(uint32_t rpm) {
|
||||
sys.spindle_speed = rpm;
|
||||
|
||||
if (rpm == 0) {
|
||||
sys.spindle_speed = 0.0;
|
||||
sys.spindle_speed = 0;
|
||||
set_output(0);
|
||||
} else {
|
||||
sys.spindle_speed = rpm;
|
||||
|
@@ -110,11 +110,11 @@ Some features should not be changed. See notes below.
|
||||
//#define CONNECT_TO_SSID "your SSID"
|
||||
//#define SSID_PASSWORD "your SSID password"
|
||||
//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_WIFI //enable wifi
|
||||
//#define ENABLE_WIFI //enable wifi
|
||||
|
||||
#define ENABLE_HTTP //enable HTTP and all related services
|
||||
#define ENABLE_OTA //enable OTA
|
||||
@@ -446,7 +446,7 @@ Some features should not be changed. See notes below.
|
||||
// NOTE: Only use this for debugging purposes!! When echoing, this takes up valuable resources and can effect
|
||||
// performance. If absolutely needed for normal operation, the serial write buffer should be greatly increased
|
||||
// to help minimize transmission waiting within the serial write protocol.
|
||||
// #define REPORT_ECHO_LINE_RECEIVED // Default disabled. Uncomment to enable.
|
||||
//#define REPORT_ECHO_LINE_RECEIVED // Default disabled. Uncomment to enable.
|
||||
|
||||
// Minimum planner junction speed. Sets the default minimum junction speed the planner plans to at
|
||||
// every buffer block junction, except for starting from rest and end of the buffer, which are always
|
||||
|
@@ -379,6 +379,14 @@ uint8_t limits_get_state() {
|
||||
// NOTE: Used by jogging to limit travel within soft-limit volume.
|
||||
void limits_soft_check(float* target) {
|
||||
if (system_check_travel_limits(target)) {
|
||||
// TODO for debugging only 3 axes right now
|
||||
grbl_msg_sendf(CLIENT_SERIAL,
|
||||
MSG_LEVEL_INFO,
|
||||
"Soft limit error target WPOS X:%5.2f Y:%5.2f Z:%5.2f",
|
||||
target[X_AXIS] - gc_state.coord_system[X_AXIS],
|
||||
target[Y_AXIS] - gc_state.coord_system[Y_AXIS],
|
||||
target[Z_AXIS] - gc_state.coord_system[Z_AXIS]);
|
||||
|
||||
sys.soft_limit = true;
|
||||
// Force feed hold if cycle is active. All buffered blocks are guaranteed to be within
|
||||
// workspace volume so just come to a controlled stop so position is not lost. When complete
|
||||
|
Reference in New Issue
Block a user