Skip to content

Commit cdda5cc

Browse files
committed
Fix error caused by non-existent variable_frequency property
1 parent c71b9e4 commit cdda5cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_motor/stepper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def __init__(
114114
self._coil = (ain2, bin1, ain1, bin2)
115115
for i in range(4):
116116
if self._coil[i].frequency < 1500:
117-
if not self._coil[i].variable_frequency:
117+
if hasattr(self._coil[i], "variable_frequency") and not self._coil[i].variable_frequency:
118118
raise ValueError(
119119
"PWMOut outputs must either be set to at least "
120120
"1500 Hz or allow variable frequency."

0 commit comments

Comments
 (0)