From: Leandro Lucarella Date: Tue, 1 Nov 2005 18:26:10 +0000 (+0000) Subject: Bugfix en recibir. X-Git-Tag: 0.1-recibe-matriz-raw-por-udp~55 X-Git-Url: https://git.llucax.com/z.facultad/66.09/etherled.git/commitdiff_plain/e5335c9876a28f215b894af99ad2ff7f55888c01 Bugfix en recibir. --- diff --git a/cliente/cetherled.py b/cliente/cetherled.py index 58d9aab..c242769 100755 --- a/cliente/cetherled.py +++ b/cliente/cetherled.py @@ -64,7 +64,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 +81,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()