mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-08-29 09:10:03 +02:00
Rate Adjusting Fix
This commit is contained in:
@@ -476,6 +476,7 @@ Error gc_execute_line(char* line, uint8_t client) {
|
||||
if (spindle->is_reversable || spindle->inLaserMode()) {
|
||||
gc_block.modal.spindle = SpindleState::Ccw;
|
||||
} else {
|
||||
grbl_msg_sendf(CLIENT_SERIAL, MsgLevel::Info, "M4 requires laser mode or a reversable spindle");
|
||||
FAIL(Error::GcodeUnsupportedCommand);
|
||||
}
|
||||
break;
|
||||
|
@@ -551,6 +551,8 @@ void st_prep_buffer() {
|
||||
prep.current_speed = sqrt(pl_block->entry_speed_sqr);
|
||||
}
|
||||
|
||||
st_prep_block->is_pwm_rate_adjusted = false; // set default value
|
||||
// prep.inv_rate is only used if is_pwm_rate_adjusted is true
|
||||
if (spindle->inLaserMode()) { //
|
||||
if (pl_block->spindle == SpindleState::Ccw) {
|
||||
// Pre-compute inverse programmed rate to speed up PWM updating per step segment.
|
||||
|
Reference in New Issue
Block a user