Commit 8b3434a
Luca Toniolo
Fix split-cycle elapsed_time advance: prevent velocity dip on short segments
In Phase B of a split cycle, cycle_time was still set to remain_time
when tpUpdateCycle advanced elapsed_time. This made elapsed = 2*remain
instead of remain+cycleTime, causing tpCheckEndCondition to compute a
negative last_sample_time when remain < 0.5*cycleTime. Short segments
that should have been detected for split-cycle handling were missed,
completing mid-cycle on the next regular cycle with progress clamped
to target — producing a 20-33% velocity dip and ~30M mm/s³ jerk spike.
Reset cycle_time to cycleTime after saving remain_time but before
tpUpdateCycle, so the elapsed advance gives the correct value and
tpCheckEndCondition can properly detect short segments during Phase B.1 parent 1b31859 commit 8b3434a
1 file changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4252 | 4252 | | |
4253 | 4253 | | |
4254 | 4254 | | |
4255 | | - | |
4256 | 4255 | | |
4257 | 4256 | | |
4258 | 4257 | | |
| |||
4920 | 4919 | | |
4921 | 4920 | | |
4922 | 4921 | | |
| 4922 | + | |
| 4923 | + | |
| 4924 | + | |
| 4925 | + | |
| 4926 | + | |
| 4927 | + | |
| 4928 | + | |
| 4929 | + | |
| 4930 | + | |
| 4931 | + | |
| 4932 | + | |
4923 | 4933 | | |
4924 | 4934 | | |
4925 | 4935 | | |
| |||
0 commit comments