Commit db78b96
committed
Stop motor at hard limits in Pivot sim
When the Pivot mechanism hits its lower or upper hard limit the sim previously only snapped the encoder position, allowing the simulated motor to keep driving past the limit. This change stops the motor by zeroing the DC motor angular velocity and clearing the duty cycle in both the lower- and upper-limit branches, and adds comments explaining the intent to prevent further movement past hard limits.1 parent 653f64b commit db78b96
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
380 | 383 | | |
381 | 384 | | |
382 | 385 | | |
383 | 386 | | |
384 | 387 | | |
385 | 388 | | |
386 | 389 | | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
387 | 393 | | |
388 | 394 | | |
389 | 395 | | |
| |||
0 commit comments