From 3e9146faab3e42e7d4a31182d9a5dc38a646f1fa Mon Sep 17 00:00:00 2001 From: Zach Schimke Date: Sat, 18 Jun 2022 17:26:33 -0700 Subject: [PATCH] Retool of macros to remove default_parameters Due to Klipper deprecating this function --- caselight.cfg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/caselight.cfg b/caselight.cfg index 713dcf0..59594d2 100644 --- a/caselight.cfg +++ b/caselight.cfg @@ -17,7 +17,6 @@ initial_WHITE: 0.1 ##################################################################### [gcode_macro _CASELIGHT] -default_parameter_COLOR: 'white' variable_colors: { 'red': (1.0, 0.0, 0.0, 0.0), 'orange': (1.0, 0.5, 0.0, 0.0), 'yellow': (1.0, 1.0, 0.0, 0.0), @@ -39,7 +38,7 @@ variable_colors: { 'red': (1.0, 0.0, 0.0, 0.0), variable_leds: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16] gcode: # Grab the color values - {% set RGBW = colors.get(COLOR|lower, (0.0, 0.0, 0.0, 0.7)) %} + {% set RGBW = colors.get(COLOR|default('white')|lower, (0.0, 0.0, 0.0, 0.7)) %} {% set R = RGBW[0] %} {% set G = RGBW[1] %} {% set B = RGBW[2] %}