-
Notifications
You must be signed in to change notification settings - Fork 1
Description
It seems impossible to eliminate the risk of missed detections completely. Occasionally a detection still fails due to one of the beeps not being recognized. It is unclear why, maybe the printer just botches up an M300 command or maybe there still is an occasional glitch in the audio stream. The risk of this happening seems to be around the level of 1/1000 which makes it nearly impossible to debug.
Still, the risk remains that such failure will happen right at the moment the last fan speed change for a long while is supposed to be performed. If this is missed, the fan could keep blowing at much too high or low speed and ruin the print.
A workaround is to repeat a sequence after a few seconds, if no new sequence follows within reasonable time (say 10 seconds). The risk that two consecutive sequences fail should be extremely low.
The streamed data flow in pwm_postprocessor makes this a bit tricky to implement. The simplest way is probably to make two passes over the G-code, keeping track of when and where sequences were inserted during the first pass and then inserting duplicates in the second pass.