Skip to content

Commit 59cd74a

Browse files
authored
Improve speed integer and rename "speed_pct" to "speed" (#500)
* SpeedInteger -> SpeedValue * strip out "speed_pct" and use native units everywhere internally Minimizes rounding. * Round rather than truncate; test for within minimal rounding error * no longer needs to be an "integer percentage" * Install evdev 1.0.0 on Travis as a workaround for build failure
1 parent e2dd9a1 commit 59cd74a

4 files changed

Lines changed: 145 additions & 128 deletions

File tree

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ sudo: false
66
git:
77
depth: 100
88
install:
9-
- pip install -q Pillow evdev Sphinx sphinx_bootstrap_theme recommonmark evdev
10-
- pip install -q -r ./docs/requirements.txt
9+
- pip install Pillow Sphinx sphinx_bootstrap_theme recommonmark evdev==1.0.0
10+
- pip install -r ./docs/requirements.txt
1111
script:
1212
- chmod -R g+rw ./tests/fake-sys/devices/**/*
1313
- ./tests/api_tests.py

docs/motors.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Motor classes
1010
Units
1111
-----
1212

13-
Most methods which run motors with accept a ``speed`` or ``speed_pct`` argument. While this can be provided as an integer which will be interpreted as a percentage of max speed, you can also specify an instance of any of the following classes, each of which represents a different unit system:
13+
Most methods which run motors will accept a ``speed`` argument. While this can be provided as an integer which will be interpreted as a percentage of max speed, you can also specify an instance of any of the following classes, each of which represents a different unit system:
1414

15-
.. autoclass:: SpeedInteger
15+
.. autoclass:: SpeedValue
1616
.. autoclass:: SpeedPercent
1717
.. autoclass:: SpeedNativeUnits
1818
.. autoclass:: SpeedRPS

0 commit comments

Comments
 (0)