Skip to content

Commit

Permalink
Fix lazily allocated tool tackle check (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
benagricola authored Dec 19, 2024
1 parent 5f477ca commit 5d232d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion macro/machine/M4000.g
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if { param.P >= limits.tools || param.P < 0 }
; This allows us to re-run a file that defines the tool that is currently
; loaded, without unloading the tool.
; This has to be split over multiple lines due to length of the condition.
if { global.mosTT[param.P] != null && tools[param.P] != null }
if { exists(global.mosTT[param.P]) && global.mosTT[param.P] != null && exists(tools[param.P]) && tools[param.P] != null }
var toolSame = { global.mosTT[param.P][0] == param.R && tools[param.P].spindle == ((exists(param.I)) ? param.I : global.mosSID) }

set var.toolSame = { var.toolSame && tools[param.P].name == param.S }
Expand Down

0 comments on commit 5d232d4

Please sign in to comment.