mirror of
https://github.com/grblHAL/core.git
synced 2025-12-13 20:04:08 +08:00
Fix for laser enable not restored after feedhold. Ref. issue #798.
Fix for incorrect direction of motion via second stepper driver used for step injection (plasma THC) and stepper spindle.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
## grblHAL ##
|
||||
|
||||
Latest build date is 20250825, see the [changelog](changelog.md) for details.
|
||||
Latest build date is 20250829, see the [changelog](changelog.md) for details.
|
||||
|
||||
> [!NOTE]
|
||||
> A settings reset will be performed on an update of builds prior to 20241208. Backup and restore of settings is recommended.
|
||||
|
||||
18
changelog.md
18
changelog.md
@@ -1,5 +1,21 @@
|
||||
## grblHAL changelog
|
||||
|
||||
<a name="20250829">Build 20250829
|
||||
|
||||
Core:
|
||||
|
||||
* Fix for laser enable not restored after feedhold. Ref. issue [#798](https://github.com/grblHAL/core/issues/798).
|
||||
|
||||
* Fix for incorrect direction of motion via second stepper driver used for step injection /(plasma THC/) and stepper spindle.
|
||||
|
||||
Plugins:
|
||||
|
||||
* Keypad, display: workaround for ESP32 defaulting to 32-bit enums, allows use if display plugin.
|
||||
|
||||
* Plasma: added setting for controlling Z-axis feedrate from current XY feedrate, changed up/down control to accelerated/decelerated continuous motion.
|
||||
|
||||
---
|
||||
|
||||
<a name="20250825">Build 20250825
|
||||
|
||||
Core:
|
||||
@@ -40,7 +56,7 @@ Core:
|
||||
* Changed signature of limit check functions, [grbl.travel_limits()](https://svn.io-engineering.com/grblHAL/html/core__handlers_8h.html#a56eced06d1c379782d86c2f139cd3f96) et. al. to include a pointer to the work envelope to use.
|
||||
This may simplify implementations of plugins that want to alter the envelope.
|
||||
|
||||
* Updated spindle off handling to check for "at speed" on deceleration when spindle is "at speed" capable
|
||||
* Updated spindle off handling to check for "at speed" on spin down when spindle is "at speed" capable
|
||||
|
||||
Drivers:
|
||||
|
||||
|
||||
2
grbl.h
2
grbl.h
@@ -42,7 +42,7 @@
|
||||
#else
|
||||
#define GRBL_VERSION "1.1f"
|
||||
#endif
|
||||
#define GRBL_BUILD 2020825
|
||||
#define GRBL_BUILD 2020829
|
||||
|
||||
#define GRBL_URL "https://github.com/grblHAL"
|
||||
|
||||
|
||||
@@ -313,10 +313,11 @@ float plan_compute_profile_nominal_speed (plan_block_t *block)
|
||||
if(block->condition.rapid_motion)
|
||||
nominal_speed *= (0.01f * (float)sys.override.rapid_rate);
|
||||
else {
|
||||
if(nominal_speed > block->rapid_rate)
|
||||
nominal_speed = block->rapid_rate;
|
||||
if(!block->condition.no_feed_override)
|
||||
if(sys.override.feed_rate != 100 && !block->condition.no_feed_override) {
|
||||
if(nominal_speed > block->rapid_rate)
|
||||
nominal_speed = block->rapid_rate;
|
||||
nominal_speed *= (0.01f * (float)sys.override.feed_rate);
|
||||
}
|
||||
if(nominal_speed > block->rapid_rate)
|
||||
nominal_speed = block->rapid_rate;
|
||||
}
|
||||
|
||||
@@ -461,6 +461,7 @@ typedef enum {
|
||||
Setting_RelayPortProbe2 = 679,
|
||||
Setting_StepperEnableDelay = 680,
|
||||
Setting_ModBus_StreamFormat = 681,
|
||||
Setting_THC_FeedFactor = 682,
|
||||
|
||||
Setting_SpindlePWMOptions1 = 709,
|
||||
|
||||
|
||||
@@ -684,8 +684,8 @@ bool spindle_restore (spindle_ptrs_t *spindle, spindle_state_t state, float rpm,
|
||||
{
|
||||
bool ok;
|
||||
|
||||
if((ok = spindle->cap.laser)) // When in laser mode, ignore spindle spin-up delay. Set to turn on laser when cycle starts.
|
||||
sys.step_control.update_spindle_rpm = On;
|
||||
if(spindle->cap.laser) // When in laser mode, ignore spindle spin-up delay. Set to turn on laser when cycle starts.
|
||||
ok = (sys.step_control.update_spindle_rpm = spindle_set_state(spindle, state, 0.0f));
|
||||
else if(!(ok = spindle_check_state(spindle, state)))
|
||||
ok = spindle_set_state_wait(spindle, state, rpm, delay_ms, DelayMode_SysSuspend);
|
||||
|
||||
|
||||
10
stepper2.c
10
stepper2.c
@@ -390,15 +390,11 @@ that calls st2_motor_run().
|
||||
*/
|
||||
bool st2_motor_move (st2_motor_t *motor, const float move, const float speed, position_t type)
|
||||
{
|
||||
bool dir = move < 0.0f;
|
||||
|
||||
if(speed == 0.0f)
|
||||
return false;
|
||||
|
||||
if((motor->dir.mask == 0) != dir)
|
||||
motor->dir.mask = dir ? 0 : motor->axis.mask;
|
||||
|
||||
motor->ptype = type;
|
||||
motor->dir.bits = (move < 0.0f ? motor->axis.bits : 0);
|
||||
|
||||
switch(type) {
|
||||
|
||||
@@ -417,7 +413,7 @@ bool st2_motor_move (st2_motor_t *motor, const float move, const float speed, po
|
||||
if(motor->move == 1 && type == Stepper2_Steps) {
|
||||
if(motor->state == State_Idle) {
|
||||
|
||||
if(motor->dir.mask)
|
||||
if(motor->dir.bits)
|
||||
motor->position--;
|
||||
else
|
||||
motor->position++;
|
||||
@@ -561,7 +557,7 @@ __attribute__((always_inline)) static inline bool _motor_run (st2_motor_t *motor
|
||||
// output step;
|
||||
hal.stepper.output_step(motor->axis, motor->dir);
|
||||
|
||||
if(motor->dir.mask)
|
||||
if(motor->dir.bits)
|
||||
motor->position--;
|
||||
else
|
||||
motor->position++;
|
||||
|
||||
Reference in New Issue
Block a user