def dmxData(self, data: tuple):
        """
        For legacy devices and to prevent errors, the length of the DMX data is normalized to 512
        """
        newData = [0]*512
        for i in range(0, min(len(data), 512)):
            newData[i] = data[i]
        self._dmxData = tuple(newData)
        # in theory this class supports dynamic length, so the next line is correcting the length
        self.length = 126 + len(self._dmxData)
def dmxData ( self , data : tuple ) : newData = [ 0 ] * 512 for i in range ( 0 , min ( len ( data ) , 512 ) ) : newData [ i ] = data [ i ] self . _dmxData = tuple ( newData ) self . length = 126 + len ( self . _dmxData )
For legacy devices and to prevent errors, the length of the DMX data is normalized to 512