X-Git-Url: https://git.llucax.com/z.facultad/66.09/etherled.git/blobdiff_plain/e773ed11aa9589385dc3d1bd31155570cc83d7d8..cf711545839c42cd01d385f5d474099a590b7cfd:/cliente/cetherled.py diff --git a/cliente/cetherled.py b/cliente/cetherled.py index 58d9aab..7f41608 100755 --- a/cliente/cetherled.py +++ b/cliente/cetherled.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: iso-8859-1 -*- # vim: set expandtab tabstop=4 shiftwidth=4 : #---------------------------------------------------------------------------- # Etherled @@ -64,7 +63,11 @@ class MainWindow(SimpleGladeApp): self.device.matrix = self.leds2matrix() def on_btn_recibir_clicked(self, widget, *args): - self.device.matrix = self.leds2matrix() + matrix = self.device.matrix + for row in xrange(16): + for col in xrange(16): + self.tabla[row,col].prendido = matrix[row,col] + etherled.protocol._print_matrix(matrix) def on_main_window_delete_event(self, widget, event, *args): self.quit() @@ -77,13 +80,6 @@ class MainWindow(SimpleGladeApp): etherled.protocol._print_matrix(matrix) return matrix - def matrix2leds(self, matrix): - for row in xrange(16): - for col in xrange(16): - self.tabla[row,col].prendido = matrix[row,col] - etherled.protocol._print_matrix(matrix) - return matrix - def main(): gtk.threads_init() main_window = MainWindow()