Skip to content

Commit

Permalink
layers: Fix off-by-one in TOTAL_LAYER
Browse files Browse the repository at this point in the history
  • Loading branch information
jschuh committed Jun 20, 2023
1 parent d7b3337 commit 01c0d8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layers.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ gcode:
description: Clears scheduled gcode commands and state for all layers.
Usage: INIT_LAYER_GCODE LAYERS=<num>
gcode:
SET_PRINT_STATS_INFO TOTAL_LAYER="{params.LAYERS|int}" CURRENT_LAYER="{0}"
SET_PRINT_STATS_INFO TOTAL_LAYER="{params.LAYERS|int + 1}" CURRENT_LAYER="{0}"
SET_GCODE_VARIABLE MACRO=_km_layer_run VARIABLE=cur_height VALUE="{0.0}"
SET_GCODE_VARIABLE MACRO=_km_layer_run VARIABLE=clearance_z VALUE="{0.0}"
SET_GCODE_VARIABLE MACRO=_km_layer_run VARIABLE=commands_layer VALUE="{{}}"
Expand Down

0 comments on commit 01c0d8a

Please sign in to comment.