The set_register() code may block, and it therefore may be possible that the loop in _init_registers() could occur in parallel with other updates. That could result in a "OrderedDict mutated during iteration" error.
Avoid the error by querying the latest value during each iteration of the loop.
The set_register() code may block, and it therefore may be possible that the loop in _init_registers() could occur in parallel with other updates. That could result in a "OrderedDict mutated during iteration" error.
Avoid the error by querying the latest value during each iteration of the loop.
Error reported at https://klipper.discourse.group/t/unhandled-exception-during-run-z-hop/11580 and https://klipper.discourse.group/t/sensorless-homing-x-returns-unhandled-exception-during-run/9844
-Kevin