gcode_macro parameters not working
I have gcode_macro section in my printer.cfg that uses parameter DELAY (from example-extras.cfg):
[gcode_macro MY_DELAY]
gcode:
G4 P{DELAY}
Now I execute:
MY_DELAY DELAY=100
And get:
Recv: !! Error on "G4 P{DELAY}": unable to parse {
I'll check, thanks for the feedback.
From your log I see that your macro definition is
[gcode_macro MY_DELAY]
gcode = "G4 P{DELAY}"
Try to remove double quotes
[gcode_macro MY_DELAY]
gcode = G4 P{DELAY}
I think I tried both and both is not working.
Actually I tried:
gcode:
G4 P{DELAY}
It seems that you don't have the latest code. Try to update your codebase.
cd ~/klipper
git pull
sudo service klipper restart
I get the same parsing error when I use gcode_macro.py before the macro improvement with parameters change.
pi@octopi:~/klipper $ git pull
Already up-to-date.
Check the size of gcode_macro.py. It has to be ~1307 bytes.
What's the git log output
cd ~/klipper
git log -n 5
EDIT:
Try to update again
cd ~/klipper
git fetch
git checkout -f master
git pull
sudo service klipper restart
Yeap, git reset --hard helped. Sorry. Closed.