@@ -211,7 +211,7 @@ def sequence(self) -> "_DRV2605_Sequence":
211
211
212
212
def set_waveform (self , effect_id : int , slot : int = 0 ) -> None :
213
213
"""Select an effect waveform for the specified slot (default is slot 0,
214
- but up to 7 effects can be combined with slot values 0 to 6 ). See the
214
+ but up to 8 effects can be combined with slot values 0 to 7 ). See the
215
215
datasheet for a complete table of effect ID values and the associated
216
216
waveform / effect.
217
217
@@ -220,8 +220,8 @@ def set_waveform(self, effect_id: int, slot: int = 0) -> None:
220
220
"""
221
221
if not 0 <= effect_id <= 123 :
222
222
raise ValueError ("Effect ID must be a value within 0-123!" )
223
- if not 0 <= slot <= 6 :
224
- raise ValueError ("Slot must be a value within 0-6 !" )
223
+ if not 0 <= slot <= 7 :
224
+ raise ValueError ("Slot must be a value within 0-7 !" )
225
225
self ._write_u8 (_DRV2605_REG_WAVESEQ1 + slot , effect_id )
226
226
227
227
# pylint: disable=invalid-name
@@ -316,7 +316,7 @@ def __init__(self, DRV2605_instance: DRV2605) -> None:
316
316
317
317
def __setitem__ (self , slot : int , effect : Union [Effect , Pause ]) -> None :
318
318
"""Write an Effect or Pause to a slot."""
319
- if not 0 <= slot <= 6 :
319
+ if not 0 <= slot <= 7 :
320
320
raise IndexError ("Slot must be a value within 0-6!" )
321
321
if not isinstance (effect , (Effect , Pause )):
322
322
raise TypeError ("Effect must be either an Effect() or Pause()!" )
@@ -325,7 +325,7 @@ def __setitem__(self, slot: int, effect: Union[Effect, Pause]) -> None:
325
325
326
326
def __getitem__ (self , slot : int ) -> Union [Effect , Pause ]:
327
327
"""Read an effect ID from a slot. Returns either a Pause or Effect class."""
328
- if not 0 <= slot <= 6 :
328
+ if not 0 <= slot <= 7 :
329
329
raise IndexError ("Slot must be a value within 0-6!" )
330
330
# pylint: disable=protected-access
331
331
slot_contents = self ._drv2605 ._read_u8 (_DRV2605_REG_WAVESEQ1 + slot )
@@ -335,7 +335,7 @@ def __getitem__(self, slot: int) -> Union[Effect, Pause]:
335
335
336
336
def __iter__ (self ) -> Union [Effect , Pause ]:
337
337
"""Returns an iterator over the waveform sequence slots."""
338
- for slot in range (0 , 7 ):
338
+ for slot in range (0 , 8 ):
339
339
yield self [slot ]
340
340
341
341
def __repr__ (self ) -> str :
0 commit comments