#Placeholder confusion

1 messages · Page 1 of 1 (latest)

rough mesa
#

Why do some placeholders work with {} and [], but some only work with one of the brackets?

Example: {printer_preset} and [printer_preset] both work.

[filament_preset] works fine and {filament_preset} fails.

In my example both placeholders have the same data type of (string) shown in the help info about the placeholder.

I'm also just kinda generally confused by this because when you double click to insert a placeholder I would assume it should add the needed type of brackets at the same time.

reef yoke
#

Depends on the programming language read by the firmware.

rough mesa
#

You have any resources for this?

reef yoke
#

You'd have to look at what languages the various firmwares use. Klipper and Marlin are vastly different, and there are at least 5 other firmware types that could all be different.

rough mesa
#

My understanding for these placeholders is that the printer firmware does not see these at all as Orca should be replacing them in the gcode. So that as the reason makes me even more confused as to this behavior.

tropic chasm
#

Any placeholder will be recognized in the form of some_var. Brackets ( [] ) are involved when a var can return several states, usually this_var[0] or 1, 0 being the default. The other brackets ( {} ) are for complex macros that involve doing math and conditional statements