stealthmonkey99 / OctoPrint-PWMBuzzer

M300 gcode handler (PWM buzzer via GPIO) for OctoPrint
6 stars 1 forks source link

#4: make file parsing non-blocking #6

Closed stealthmonkey99 closed 2 years ago

stealthmonkey99 commented 2 years ago

Description

As with PR #3, I want to make sure that we don't block OctoPrint's main thread when we're parsing all of the files to see which contain M300 commands. The file access was blocking, so on older hardware with lots of .gcode files uploaded the UI could stall before successfully loading for a few minutes (appears "stuck" even though it's just blocked temporarily). These changes:

Screenshot of Debug Panel

image

Test Plan