Broke PAM, not sure how...

Fresh install on RatOS 2.0, followed the instructions on the PAM site to install. @Helge Keck Have in printer.cfg (near end)
[include pam/ratos.cfg]
[include pam/ratos.cfg]
Have in SuperSlicer start code (middle lines from Mikl, worked fine in the past)
MESH_CONFIG X0={first_layer_print_min[0]} Y0={first_layer_print_min[1]} X1={first_layer_print_max[0]} Y1={first_layer_print_max[1]}
M190 S0 ; Prevents prusaslicer from prepending m190 to the gcode ruining our macro
M109 S0 ; Prevents prusaslicer from prepending m109 to the gcode ruining our macro
START_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature]
MESH_CONFIG X0={first_layer_print_min[0]} Y0={first_layer_print_min[1]} X1={first_layer_print_max[0]} Y1={first_layer_print_max[1]}
M190 S0 ; Prevents prusaslicer from prepending m190 to the gcode ruining our macro
M109 S0 ; Prevents prusaslicer from prepending m109 to the gcode ruining our macro
START_PRINT EXTRUDER_TEMP=[first_layer_temperature] BED_TEMP=[first_layer_bed_temperature]
Error from Klippy.log (wish I could clear this entire log to get only current info)
Internal error on command:"PAM"
Internal error on command:"_START_PRINT_BED_MESH"
Traceback (most recent call last):
File "/home/pi/klipper/klippy/gcode.py", line 198, in _process_commands
handler(gcmd)
File "/home/pi/klipper/klippy/gcode.py", line 135, in <lambda>
func = lambda params: origfunc(self._get_extended_params(params))
File "/home/pi/klipper/klippy/extras/gcode_macro.py", line 186, in cmd
self.template.run_gcode_from_command(kwparams)
File "/home/pi/klipper/klippy/extras/gcode_macro.py", line 68, in run_gcode_from_command
self.gcode.run_script_from_command(self.render(context))
File "/home/pi/klipper/klippy/gcode.py", line 213, in run_script_from_command
self._process_commands(script.split('\n'), need_ack=False)
File "/home/pi/klipper/klippy/gcode.py", line 198, in _process_commands
handler(gcmd)
File "/home/pi/klipper/klippy/gcode.py", line 135, in <lambda>
func = lambda params: origfunc(self._get_extended_params(params))
File "/home/pi/klipper/klippy/extras/pam.py", line 67, in cmd_PAM
self.gcode.respond_raw('Relative Reference Index {0}'.format(str(reference_index)))
UnboundLocalError: local variable 'reference_index' referenced before assignment
MCU 'mcu' shutdown: Command request
Internal error on command:"PAM"
Internal error on command:"_START_PRINT_BED_MESH"
Traceback (most recent call last):
File "/home/pi/klipper/klippy/gcode.py", line 198, in _process_commands
handler(gcmd)
File "/home/pi/klipper/klippy/gcode.py", line 135, in <lambda>
func = lambda params: origfunc(self._get_extended_params(params))
File "/home/pi/klipper/klippy/extras/gcode_macro.py", line 186, in cmd
self.template.run_gcode_from_command(kwparams)
File "/home/pi/klipper/klippy/extras/gcode_macro.py", line 68, in run_gcode_from_command
self.gcode.run_script_from_command(self.render(context))
File "/home/pi/klipper/klippy/gcode.py", line 213, in run_script_from_command
self._process_commands(script.split('\n'), need_ack=False)
File "/home/pi/klipper/klippy/gcode.py", line 198, in _process_commands
handler(gcmd)
File "/home/pi/klipper/klippy/gcode.py", line 135, in <lambda>
func = lambda params: origfunc(self._get_extended_params(params))
File "/home/pi/klipper/klippy/extras/pam.py", line 67, in cmd_PAM
self.gcode.respond_raw('Relative Reference Index {0}'.format(str(reference_index)))
UnboundLocalError: local variable 'reference_index' referenced before assignment
MCU 'mcu' shutdown: Command request
17 Replies
Helge Keck
Helge Keck2y ago
one sec
8Complex
8Complex2y ago
Also, if it matters
v0.4.0-12-ga308377
v0.4.0-12-ga308377
Helge Keck
Helge Keck2y ago
update just installed the current version on ratos2 and it works you might have catched an earlier verison, worked on that today
8Complex
8Complex2y ago
Updated, will give it a shot
8Complex
8Complex2y ago
No description
8Complex
8Complex2y ago
just after z home after the last bed level adjustment
8Complex
8Complex2y ago
Is there maybe some conflict with sensorless homing?
Helge Keck
Helge Keck2y ago
try this [pam] auto_reference_index: True
8Complex
8Complex2y ago
Added, rebooting
Helge Keck
Helge Keck2y ago
indeed a bug, already fixed, update
8Complex
8Complex2y ago
Shoudl I remove this code before I retry?
Helge Keck
Helge Keck2y ago
yes damn+other bug lol update again sorry for that
8Complex
8Complex2y ago
kekw worries, glad it is just me working it out
Helge Keck
Helge Keck2y ago
was a bug in the bugfix ok, works here
Want results from more Discord servers?
Add your server