Exemplo n.º 1
0
    def receive_magnitudes(self, magnitudes):

        # Don't update when processing
        if self.processing:
            return
        else:
            self._magnitudes = magnitudes
            self.update_leds()
            hyperion.setColor(self._leds_data)
Exemplo n.º 2
0
    def receive_magnitudes(self, magnitudes):

        if hyperion.abort():
            self.stop()

        # Don't update when processing
        if self.processing:
            return
        else:
            self._magnitudes = magnitudes
            self.update_leds()
            hyperion.setColor(self._leds_data)
    def receive_magnitudes(self, magnitudes):

        # Don't update when processing
        if self.processing:
            return
        elif len(magnitudes) < self.cutoff:
            print 'Invalid len: {}, {}'.format(len(magnitudes), self.cutoff)
        else:
            self._magnitudes = magnitudes
            self.update_leds()

            if self.matrix:
                hyperion.setImage(self.width, self.height, self._image_data)
            else:
                hyperion.setColor(self._leds_data_temp)
    def receive_magnitudes(self, magnitudes):

        # Don't update when processing
        if self.processing:
            return
        elif len(magnitudes) < self.cutoff:
            print 'Invalid len: {}, {}'.format(len(magnitudes), self.cutoff)
        else:
            self._magnitudes = magnitudes
            self.update_leds()

            if self.matrix:
                hyperion.setImage(self.width, self.height, self._image_data)
            else:
                hyperion.setColor(self._leds_data_temp)
    def receive_magnitudes(self, magnitudes):

        # Don't update when processing
        if self.processing:
            return
        elif len(magnitudes) < self.cutoff:
            print 'Invalid len: {}, {}'.format(len(magnitudes), self.cutoff)
        else:
            self._magnitudes = magnitudes
            self.update_leds()

            # TODO: Loop colors if speed > 0
            # Loop colors for both sides
            # ld = effect._leds_data
            # h = effect.half
            # i = effect.increment
            # ld[:h] = ld[h-i:h] + ld[:h-i]
            # ld[h:] = ld[h+i:] + ld[h:h+i]
            if self.matrix:
                hyperion.setImage(self.width, self.height, self._image_data)
            else:
                hyperion.setColor(self._leds_data_temp)