We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fa3a28 commit f3bfd6dCopy full SHA for f3bfd6d
adafruit_motor/stepper.py
@@ -114,15 +114,13 @@ def __init__(
114
self._coil = (ain2, bin1, ain1, bin2)
115
for i in range(4):
116
if self._coil[i].frequency < 1500:
117
- if (
118
- hasattr(self._coil[i], "variable_frequency")
119
- and not self._coil[i].variable_frequency
120
- ):
+ try:
+ self._coil[i].frequency = 2000
+ except AttributeError:
121
raise ValueError(
122
"PWMOut outputs must either be set to at least "
123
"1500 Hz or allow variable frequency."
124
)
125
- self._coil[i].frequency = 2000
126
if microsteps < 2:
127
raise ValueError("Microsteps must be at least 2")
128
if microsteps % 2 == 1:
0 commit comments