From 20c674f5302dd523fb65de7fd4019e5c4c2990a6 Mon Sep 17 00:00:00 2001 From: Kyle Krenzer Date: Fri, 4 Sep 2026 18:02:58 -0700 Subject: [PATCH] afc.cfg: define _AFC_GLOBAL_VARS so the BT_* helper macros work BT_CHANGE_TOOL, BT_LANE_EJECT, BT_LANE_MOVE, AFC_DISABLE_SKEW and AFC_ENABLE_SKEW all read printer['gcode_macro _AFC_GLOBAL_VARS'], which upstream AFC defines in AFC_Macro_Vars.cfg. COSMOS ships its own afc.cfg without that section, so every one of those macros fails with a template error. Define the three variables the shipped macros use, with the lane prefix set to CANVAS_. Co-Authored-By: Claude Fable 5.1 --- .../recipes-data/klipper-afc-addon/files/afc.cfg | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta-opencentauri/recipes-data/klipper-afc-addon/files/afc.cfg b/meta-opencentauri/recipes-data/klipper-afc-addon/files/afc.cfg index 7d47978f..e9ea382c 100644 --- a/meta-opencentauri/recipes-data/klipper-afc-addon/files/afc.cfg +++ b/meta-opencentauri/recipes-data/klipper-afc-addon/files/afc.cfg @@ -3,6 +3,15 @@ # UPDATES WILL RESET THIS FILE. YOUR EDITS WILL BE LOST WHEN UPDATING. # ----- +# Variables shared by the BT_* helper macros below. Upstream AFC ships these in +# AFC_Macro_Vars.cfg; COSMOS only needs the ones its macros read. +[gcode_macro _AFC_GLOBAL_VARS] +description: Global variables used in multiple macros +gcode: # Leave Empty +variable_stepper_name : 'CANVAS_' # Lane name prefix, BT_CHANGE_TOOL LANE=2 becomes CHANGE_TOOL LANE=CANVAS_2 +variable_disable_skew_correction : False # When True macros disable and re-enable skew correction around kinematic moves +variable_verbose : 1 # Console output for macros + # Eject Loaded Lane [gcode_macro BT_TOOL_UNLOAD] description: Unloads the currently loaded lane