Closed pfjarschel closed 1 month ago
Main challenge is figure out what to do. Stop everything? Move back? What if it happens when running the pulling process? It will ruin everything.
And what if it happens during homing (unlikely)?
Idea: each motor has "danger" ranges. Flame is in danger if IO and brusher positions are both within any danger zones. If flame is in DZ AND the corresponding puller is also in its DZ, safeguard is triggered.
These are the cases that need to be treated differently:
When homing: Make sure pullers are homed/pulled back first (hard, since they tend to take longer to connect) When idle: Just stop all. When going to start: b5dc8843efb157bc1eabd35f0be994643ddb7526 solved this, as long as the initial positions are not too absurd. When pulling: stop pulling, move flame back (can only happen if hotzone increases too fast)
Maybe it's just easier to make the user responsible for this safety, and always pull the pullers back when shutting down.
Danger zones:
Flame in/out: x > 1.0 Brusher: x < 26, x > 36 Right: x > 74 Left: x > 86
Considering b5dc8843efb157bc1eabd35f0be994643ddb7526, 2b30265930071b4cb6662563891f8cb07e768e99 and 0303062bcd503c32444fb2d23dedba2437360c3b, this issue can be considered solved.
Loop that always check motor positions and prevents unintentional hits.
NOT the same as #9.