Klipper3d / klipper

Klipper is a 3d-printer firmware
GNU General Public License v3.0
8.99k stars 5.17k forks source link

Make TRSYNC_TIMEOUT configurable #6441

Closed EiNSTeiN- closed 6 months ago

EiNSTeiN- commented 6 months ago

I have a 5-toolhead printer, each toolhead is equipped with BTT SB2209 connected to the main mcu over canbus. Each has its own optical endstop (Voron Tap PCB) connected to the toolhead board. A little while ago I kept getting failed homing and following the solution in this post solved the issue for me: https://klipper.discourse.group/t/canbus-communication-timeout-while-homing-z/3741 (and similarly: https://github.com/bigtreetech/EBB/issues/3).

Changed TRSYNC_TIMEOUT value in “/home/pi/klipper/klippy/mcu.py” file from 0.025 to 0.050, i.e. was “TRSYNC_TIMEOUT = 0.025”, and became “TRSYNC_TIMEOUT = 0.050”, and the error “Communication timeout during homing probe” disappeared

Seems like this timeout value is used only in the homing code in home_start which explains why there are no communication errors at any other time. I've been running a version of klipper with this local change for a while but I'd like to keep getting updates, so I'm opening this PR to make the timeout value configurable at the MCU level, and default to the old value since this seems to work fine for most boards.

I'm also open to writing alternative fixes, perhaps just doubling the timeout when the mcu is connected over canbus would be better?

jakep82 commented 6 months ago

This a duplicate of an open PR (#6403), and 2 other rejected PRs.

5951

5816

EiNSTeiN- commented 6 months ago

Thanks and sorry for not searching first! I'll see if I can find the root cause and keep the conversation going on discourse.