Fix for issue #236, dual axis offsets.

Changes to allow use of M4 for laser capable spindles in laser mode even if direction control is not available.
This commit is contained in:
Terje Io
2023-04-11 20:47:45 +02:00
parent ba4ccee01e
commit b6e43d6c19
7 changed files with 38 additions and 7 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ It has been written to complement grblHAL and has features such as proper keyboa
---
Latest build date is 20230311, see the [changelog](changelog.md) for details.
Latest build date is 20230411, see the [changelog](changelog.md) for details.
__NOTE:__ A settings reset will be performed on an update of builds earlier than 20230125. Backup and restore of settings is recommended.
__IMPORTANT!__ A new setting has been introduced for ganged axes motors in build 20211121.
I have only bench tested this for a couple of drivers, correct function should be verified after updating by those who have more than three motors configured.
+22 -1
View File
@@ -1,10 +1,31 @@
## grblHAL changelog
<a name="20230401"/>Build 20230411
Core:
* Fix for issue #236, dual axis offsets.
__NOTE:__ handling of negative offset values has changed. The primary motor will now be run to correct for negative offset values by moving away from the limit switch.
Prior to this build the secondary motor was run to move towards the limit switch for negative values.
* Changes to allow use of M4 for laser capable spindles in laser mode even if direction control is not available.
Drivers:
* STM32F4xx: pin mappings fix for [BTT SKR Pro 1.x](https://github.com/grblHAL/STM32F4xx/blob/master/Inc/btt_skr_pro_v1_1_map.h) to avoid IRQ conflicts.
Plugins:
* Networking: improved handling of .gz compressed files by httpd daemon.
* Webui: more fixes for [issue #10](https://github.com/grblHAL/Plugin_WebUI/issues/10), cannot download any file from local FS but preferences.json.
---
<a name="20230409"/>20230409
Plugins:
* Networking: fix for incorrect header returned for plain .gz files.
* Networking: fix for incorrect header returned by httpd daemon for plain .gz files.
* Webui: fixes for [issue #10](https://github.com/grblHAL/Plugin_WebUI/issues/10), cannot download any file from local FS but preferences.json.
+2 -2
View File
@@ -1608,10 +1608,10 @@ status_code_t gc_execute_block (char *block)
uint_fast8_t idx = N_SYS_SPINDLE;
do {
idx--;
if(spindle_is_enabled(idx) && !spindle_get(idx)->cap.direction)
if(spindle_is_enabled(idx) && !(spindle_get(idx)->cap.direction || spindle_get(idx)->cap.laser))
FAIL(Status_GcodeUnsupportedCommand);
} while(idx);
} else if(!gc_block.spindle->cap.direction)
} else if(!(gc_block.spindle->cap.direction || gc_block.spindle->cap.laser))
FAIL(Status_GcodeUnsupportedCommand);
}
+1 -1
View File
@@ -42,7 +42,7 @@
#else
#define GRBL_VERSION "1.1f"
#endif
#define GRBL_BUILD 20230401
#define GRBL_BUILD 20230411
#define GRBL_URL "https://github.com/grblHAL"
+2 -2
View File
@@ -459,8 +459,8 @@ static bool limits_homing_cycle (axes_signals_t cycle, axes_signals_t auto_squar
// Pull off B motor to compensate for switch inaccuracy when configured.
if(auto_square.mask && settings.axis[dual_motor_axis].dual_axis_offset != 0.0f) {
hal.stepper.disable_motors(auto_square, SquaringMode_A);
if(!limits_pull_off(auto_square, settings.axis[dual_motor_axis].dual_axis_offset))
hal.stepper.disable_motors(auto_square, settings.axis[dual_motor_axis].dual_axis_offset < 0.0f ? SquaringMode_B : SquaringMode_A);
if(!limits_pull_off(auto_square, fabs(settings.axis[dual_motor_axis].dual_axis_offset)))
return false;
hal.stepper.disable_motors((axes_signals_t){0}, SquaringMode_Both);
}
+9
View File
@@ -565,6 +565,15 @@ void debug_write (const char *s)
}
}
void debug_writeln (const char *s)
{
if(dbg_write) {
dbg_write(s);
dbg_write(ASCII_EOL);
while(hal.debug.get_tx_buffer_count()); // Wait until message is delivered
}
}
static bool debug_claim_stream (io_stream_properties_t const *stream)
{
io_stream_t const *claimed = NULL;
+1
View File
@@ -342,6 +342,7 @@ io_stream_t const *stream_open_instance (uint8_t instance, uint32_t baud_rate, s
#ifdef DEBUGOUT
void debug_write (const char *s);
void debug_writeln (const char *s);
bool debug_stream_init (void);
#endif