Closed AlejandroRivera closed 3 days ago
As a workaround, I've discovered that if you define a [gcode_macro NAME]
outside of the dynamic macros file, and inside the [gcode_macro NAME]
of the dynamic macros file you define rename_existing: BASE_NAME
, things work as expected again.
Example:
in my_normal_macros.cfg
[gcode_macro HELLO]
gcode:
# Do nothing as this will be replaced by a dynamic macro
in my_dynamic_macros.cfg
[gcode_macro HELLO]
rename_existing: BASE_HELLO
gcode:
M117 Hello world
Thank you for finding this bug. I was able to reproduce this issue in Fluidd, however Mainsail works fine.
Since this works with Mainsail, I would say this is an unexpected bug with Fluidd. I'll keep this issue open, but I'll add your workaround to the documentation with a note about using Mainsail vs Fluidd.
I'd like to note that dynamic macros also don't show up in the KlipperScreen macro list, though normal macros do show up. Maybe this is related, but I'm not sure exactly where KlipperScreen gets its macro list from.
My current workaround is to call my dynamic macros _MACRO_NAME
, and then have MACRO_NAME
as a normal gcode_macro
section in printer.cfg
, which just expands to _MACRO_NAME
(and forwards all arguments).
I'm currently working on a way to automatically perform that workaround, where each dynamic macro has a standard "dummy" macro that silently calls the dynamic macro.
@AlejandroRivera @fritzw
I've added an experimental automatic workaround for this issue and am looking for testers. To install it:
cd ~/DynamicMacros
git fetch
git checkout dev
git pull
sh install.sh
sudo service klipper restart
In your [dynamicmacros]
config section, add this line:
interface_workaround: true
After this, restart Klipper, wait for it to start, then restart it again.
This should automatically create a hidden .dynamicmacros.cfg
file (note the .
in front of the name) and include it in your printer.cfg
.
Let me know if this works on your setups.
What happened?
After installing DynamicMacros, the list of Macros that Fluidd used to display has disappeared.
Fluidd: v1.30.3 (latest) DynamicMacros: v1.2-0-g6d8b1c47
Before:
After:
printer.cfg
:Fluidd console logs:
(ps. I'm not 99% sure this log is related to this issue since it's all obfuscated, but this error message appears when there are
gcode_macro
s defined in the file referenced by theconfigs
para inside the[dynamicmacros]
section. If there are no dynamic macros being loaded at all, things work as per usual.My guess is that the dynamic macro object isn't registering some attribute correctly which the Fluidd UI expects, and this breaks things in the UI.
Klippy Log
(Nothing useful found in Klippy.log)