Commit c508e9d
committed
Handle wheelForce <= 1 in auto target calc
Add a guard in ConvertAutoMarginToAutoTarget to return wheelForce when wheelForce <= 1f to avoid clamping with min > max (which could throw an ArgumentException). Update comment to clarify that an unconfigured or very small wheel force has no meaningful target and should be returned as-is. This prevents crashes for contexts where wheelForce is below 1 Nm.1 parent 165fd14 commit c508e9d
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
362 | 364 | | |
363 | 365 | | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
364 | 371 | | |
365 | 372 | | |
366 | 373 | | |
| |||
0 commit comments