SuccessChanges

Summary

  1. WIP: Fix for #9462 - Option 2 (details)
  2. Clear up the Math.ceil() / Math.round() treatment (details)
  3. Fix build error (details)
  4. Subtract one from steps to account for estop (details)
  5. Correct expected maximum values (details)
  6. Test for 1/(speed steps) (details)
  7. Test for 1/(speed steps) (details)
  8. Test for 1/(speed steps) (details)
Commit fbe33c989ef6a3d5605a9d4d84c10f331b012328 by noreply
WIP: Fix for #9462 - Option 2
The file was modifiedjava/src/jmri/jmrix/AbstractThrottle.java (diff)
Commit d1618251c1a7d7900c2cc4dea228f4dbaa534110 by noreply
Clear up the Math.ceil() / Math.round() treatment

This will do the same as in the original PR.

Tests still fail, I believe this is an error in the test. Will propose a fix.
The file was modifiedjava/src/jmri/jmrix/AbstractThrottle.java (diff)
Commit 451dd6ece59d51ad4c59cf24dc794ad4bbb76876 by noreply
Fix build error

Hey github, this is still supposed to fix #9462
The file was modifiedjava/src/jmri/jmrix/AbstractThrottle.java (diff)
Commit 78ff15e8c60f2a95ffaefd2db61310137c48a56f by noreply
Subtract one from steps to account for estop

Old (hard coded) increment was 1/127 but since 1 is reserved for estop and the actual speeds only span 2...127, this should be 1/126.
The file was modifiedjava/test/jmri/jmrix/AbstractThrottleTest.java (diff)
Commit a1c2c253010051dd7b8b8529719e76fa347931e7 by noreply
Correct expected maximum values

Where I inserted maxStepHi, 127 was hardcoded before. No functional change.
Where I inserted maxStepLo, 127 was hardcoded before. This is wrong, the function under test should not return larger values than its speed step input.
The file was modifiedjava/test/jmri/jmrix/AbstractThrottleTest.java (diff)
Commit 196c278e0bcf548e6eceb66f693466bf1fd234df by noreply
Test for 1/(speed steps)
The file was modifiedjava/test/jmri/jmrix/loconet/LocoNetThrottleTest.java (diff)
Commit 718d33edea4920616b8dd073242a074ae661efd3 by noreply
Test for 1/(speed steps)
The file was modifiedjava/test/jmri/jmrix/loconet/Ib1ThrottleTest.java (diff)
Commit 34f2fe1003d6cfdcb4d5bb655cf0b1f94442a771 by noreply
Test for 1/(speed steps)
The file was modifiedjava/test/jmri/jmrix/loconet/Ib2ThrottleTest.java (diff)