Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ deploy:
tags: true

install:
- pip install pylint circuitpython-build-tools Sphinx sphinx-rtd-theme pytest
- pip install --force-reinstall pylint==1.9.2
- pip install circuitpython-build-tools Sphinx sphinx-rtd-theme pytest

script:
- py.test
Expand Down
3 changes: 2 additions & 1 deletion adafruit_motor/stepper.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ def __init__(self, ain1, ain2, bin1, bin2, *, microsteps=16):

# set a safe pwm freq for each output
for i in range(4):
self._coil[i].frequency = 2000
if self._coil[i].frequency < 1500:
self._coil[i].frequency = 2000

self._current_microstep = 0
if microsteps < 2:
Expand Down
4 changes: 4 additions & 0 deletions tests/test_stepper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ class Coil:
def __init__(self):
self._duty_cycle = 0

@property
def frequency(self):
return 1500

@property
def duty_cycle(self):
return self._duty_cycle
Expand Down