Hello,
While I'm aware this issue really belongs to a conversation with BTT's support, I don't have high expectations for actual assistance from that side and thought it'd be a lot more pragmatic to ask here for help on a possible solution/workaround regarding the following issue.
I have BTT's smart filament sensor installed and under regular operation it works as expected. However, I sometimes adjust klipper's speed factor down to 60%-70% on particular prints (or sometimes during parts of prints) to get better results (e.g. improved surface finish etc.). In such cases, the sensor will immediately trigger a 'false positive' making it necessary to manually deactivate it for that print.
I suspect the reason behind this is that when the speed factor is reduced, the sensor isn't getting the pulses it's expecting fast enough and falsely triggers (seems logical to me, but it could be something else entirely, not sure).
A possible solution is to manually adjust the 'detection length' value for the sensor to a higher number in printer.cfg before each of these slowed down prints but that's not really practical, especially for speed changes mid-print.
So I thought perhaps there's a way to automate this 'speed factor-detection length' adjustment within klipper? maybe override M220 with a supplemental macro that automatically adjusts the filament sensor's 'detection length' value on the fly based on the relevant ratio for a newly set 'speed factor'? for example, if the original detection length is set to 14 and mid-print an M220 S60 is issued thereby reducing the speed factor to 60%, the macro will automatically adjust the detection length to 24 (=14 * 100 / 60) so as to compensate for this speed reduction?
Thanks!