Skip to content

Instantly share code, notes, and snippets.

@NameOfTheDragon
Created November 16, 2024 11:47
Show Gist options
  • Save NameOfTheDragon/3a381e2dae4cdc01a1f933722f0f9a56 to your computer and use it in GitHub Desktop.
Save NameOfTheDragon/3a381e2dae4cdc01a1f933722f0f9a56 to your computer and use it in GitHub Desktop.
Klipper macros - how to accept parameters with alternative spellings
[gcode_macro PRINT_START]
description: Ready the printer for printing.
gcode:
{% set BedTemperature = params.get('BED_TEMPERATURE', params.get('BED', 60)) | int %}
{% set ExtruderTemperature = params.get('EXTRUDER_TEMPERATURE', params.get('EXTRUDER', 210)) | int %}
{% set ExtruderStandbyTemperature = params.get('EXTRUDER_STANDBY_TEMPERATURE', params.get('STANDBY', 170)) | int %}
{% set ChamberTemperature = params.get('CHAMBER_TEMPERATURE', params.get('CHAMBER', 20)) | int %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment