From 01c0d8aa06b39576501faaf9c905fae37d8aaef0 Mon Sep 17 00:00:00 2001 From: Justin Schuh Date: Tue, 20 Jun 2023 14:40:59 -0700 Subject: [PATCH] layers: Fix off-by-one in TOTAL_LAYER --- layers.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layers.cfg b/layers.cfg index 05ee7e6..feb0228 100644 --- a/layers.cfg +++ b/layers.cfg @@ -173,7 +173,7 @@ gcode: description: Clears scheduled gcode commands and state for all layers. Usage: INIT_LAYER_GCODE LAYERS= 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="{{}}"