@@ -191,19 +191,18 @@ def library(self, val: int) -> None:
191191 @property
192192 def sequence (self ) -> "_DRV2605_Sequence" :
193193 """List-like sequence of waveform effects.
194- Get or set an effect waveform for slot 0-6 by indexing the sequence
194+ Get or set an effect waveform for slot 0-7 by indexing the sequence
195195 property with the slot number. A slot must be set to either an :class:`~Effect`
196196 or :class:`~Pause` class. See the datasheet for a complete table of effect ID
197197 values and the associated waveform / effect.
198198
199199 E.g.:
200+
200201 .. code-block:: python
201202
202203 # Getting the effect stored in a slot
203204 slot_0_effect = drv.sequence[0]
204205
205- .. code-block:: python
206-
207206 # Setting an Effect in the first sequence slot
208207 drv.sequence[0] = Effect(88)
209208 """
@@ -317,16 +316,16 @@ def __init__(self, DRV2605_instance: DRV2605) -> None:
317316 def __setitem__ (self , slot : int , effect : Union [Effect , Pause ]) -> None :
318317 """Write an Effect or Pause to a slot."""
319318 if not 0 <= slot <= 7 :
320- raise IndexError ("Slot must be a value within 0-6 !" )
319+ raise IndexError ("Slot must be a value within 0-7 !" )
321320 if not isinstance (effect , (Effect , Pause )):
322- raise TypeError ("Effect must be either an Effect() or Pause() !" )
321+ raise TypeError ("Effect must be either an Effect or Pause!" )
323322 # pylint: disable=protected-access
324323 self ._drv2605 ._write_u8 (_DRV2605_REG_WAVESEQ1 + slot , effect .raw_value )
325324
326325 def __getitem__ (self , slot : int ) -> Union [Effect , Pause ]:
327326 """Read an effect ID from a slot. Returns either a Pause or Effect class."""
328327 if not 0 <= slot <= 7 :
329- raise IndexError ("Slot must be a value within 0-6 !" )
328+ raise IndexError ("Slot must be a value within 0-7 !" )
330329 # pylint: disable=protected-access
331330 slot_contents = self ._drv2605 ._read_u8 (_DRV2605_REG_WAVESEQ1 + slot )
332331 if slot_contents & 0x80 :
0 commit comments