This pr does a few things, first it allows listing gcode files in the gcodes dir like virtual sd card typically would. second, it makes virtual_sdcard.py own all of the file operations. third registers M32 so the lcd menu can be directed to web_dwc2 to start jobs which allows DWC2 to handle it properly.
at the very least the rework of the select/clear needs to be done so that virtual_sdcard can own all selection stateful mutations.
I am fairly certain file handles were being leaked by DWC2 because the last used was not explicitly closed when starting the next print. you can use ls -l /proc/`pidof python`/fd to print the list of current open descriptors. (assuming the only python process is klippy) so by having virtual_sdcard own the file operations you no longer need to worry about cleaning up, it should JustWork™
This pr does a few things, first it allows listing gcode files in the
gcodes
dir like virtual sd card typically would. second, it makes virtual_sdcard.py own all of the file operations. third registers M32 so the lcd menu can be directed to web_dwc2 to start jobs which allows DWC2 to handle it properly.This pr depends on one on the mainline: https://github.com/KevinOConnor/klipper/pull/2767
at the very least the rework of the select/clear needs to be done so that virtual_sdcard can own all selection stateful mutations.
I am fairly certain file handles were being leaked by DWC2 because the last used was not explicitly closed when starting the next print. you can use
ls -l /proc/`pidof python`/fd
to print the list of current open descriptors. (assuming the only python process is klippy) so by having virtual_sdcard own the file operations you no longer need to worry about cleaning up, it should JustWork™