@@ -181,7 +181,7 @@ def library(self, val):
181
181
@property
182
182
def sequence (self ):
183
183
"""List-like sequence of waveform effects.
184
- Get or set an effect waveform for slot 0-6 by indexing the sequence
184
+ Get or set an effect waveform for slot 0-7 by indexing the sequence
185
185
property with the slot number. A slot must be set to either an Effect()
186
186
or Pause() class. See the datasheet for a complete table of effect ID
187
187
values and the associated waveform / effect.
@@ -192,14 +192,14 @@ def sequence(self):
192
192
193
193
def set_waveform (self , effect_id , slot = 0 ):
194
194
"""Select an effect waveform for the specified slot (default is slot 0,
195
- but up to 7 effects can be combined with slot values 0 to 6 ). See the
195
+ but up to 8 effects can be combined with slot values 0 to 7 ). See the
196
196
datasheet for a complete table of effect ID values and the associated
197
197
waveform / effect.
198
198
"""
199
199
if not 0 <= effect_id <= 123 :
200
200
raise ValueError ("Effect ID must be a value within 0-123!" )
201
- if not 0 <= slot <= 6 :
202
- raise ValueError ("Slot must be a value within 0-6 !" )
201
+ if not 0 <= slot <= 7 :
202
+ raise ValueError ("Slot must be a value within 0-7 !" )
203
203
self ._write_u8 (_DRV2605_REG_WAVESEQ1 + slot , effect_id )
204
204
205
205
# pylint: disable=invalid-name
@@ -285,7 +285,7 @@ def __init__(self, DRV2605_instance):
285
285
286
286
def __setitem__ (self , slot , effect ):
287
287
"""Write an Effect or Pause to a slot."""
288
- if not 0 <= slot <= 6 :
288
+ if not 0 <= slot <= 7 :
289
289
raise IndexError ("Slot must be a value within 0-6!" )
290
290
if not isinstance (effect , (Effect , Pause )):
291
291
raise TypeError ("Effect must be either an Effect() or Pause()!" )
@@ -294,7 +294,7 @@ def __setitem__(self, slot, effect):
294
294
295
295
def __getitem__ (self , slot ):
296
296
"""Read an effect ID from a slot. Returns either a Pause or Effect class."""
297
- if not 0 <= slot <= 6 :
297
+ if not 0 <= slot <= 7 :
298
298
raise IndexError ("Slot must be a value within 0-6!" )
299
299
# pylint: disable=protected-access
300
300
slot_contents = self ._drv2605 ._read_u8 (_DRV2605_REG_WAVESEQ1 + slot )
@@ -304,7 +304,7 @@ def __getitem__(self, slot):
304
304
305
305
def __iter__ (self ):
306
306
"""Returns an iterator over the waveform sequence slots."""
307
- for slot in range (0 , 7 ):
307
+ for slot in range (0 , 8 ):
308
308
yield self [slot ]
309
309
310
310
def __repr__ (self ):
0 commit comments