jschuh / klipper-macros

A collection of useful macros for the Klipper 3D printer firmware
GNU General Public License v3.0
967 stars 173 forks source link

pause_resume_cancel: No virtual_sdcard checking #88

Closed pa0los closed 1 year ago

pa0los commented 1 year ago

When printing outside of octoprint (mainsail) the virtual_sdcard interface is not used. This causes error when trying to pause the print: "Print from SD card is not in progress." In case this check is needed, maybe could be replaced with: printer.print_stats.state == "printing"

jschuh commented 1 year ago

I don't want to remove the virtual_sdcard requirement because that would involve a whole mess of extra checks whenever something associated with it is touched. However, I will make some changes to have PAUSE and similar macros function even if not printing from the sd.

pa0los commented 1 year ago

I removed this requirement because virtual_sdcard seems not be used anywhere else - beside the lcd_menu which has already some sanity checks in place. I'm currently using the macros from my branch and seems to be working fine - even with lcd_menus enabled.

jschuh commented 1 year ago

It creeps in at weird corners. Things like SET_PRINT_STATS_INFO come from the print_stats module, which gets chain loaded by virtual_sdcard.

Anyway, I'll be merging 0f3e3257f87112f3957f812b8b7c4d9f9d3bba8d soon, which will fix the pause case.