From e773ed11aa9589385dc3d1bd31155570cc83d7d8 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Tue, 1 Nov 2005 18:20:00 +0000 Subject: [PATCH] Se elimina dependencia de dispatcher y se implementa el recibir. --- cliente/cetherled.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/cliente/cetherled.py b/cliente/cetherled.py index 936d9b7..58d9aab 100755 --- a/cliente/cetherled.py +++ b/cliente/cetherled.py @@ -28,7 +28,7 @@ import os import gtk from simplegladeapp import SimpleGladeApp from simplegladeapp import bindtextdomain -from dispatcher import Dispatcher +#from dispatcher import Dispatcher from led import Led import etherled @@ -63,6 +63,9 @@ class MainWindow(SimpleGladeApp): def on_btn_enviar_clicked(self, widget, *args): self.device.matrix = self.leds2matrix() + def on_btn_recibir_clicked(self, widget, *args): + self.device.matrix = self.leds2matrix() + def on_main_window_delete_event(self, widget, event, *args): self.quit() @@ -71,10 +74,13 @@ class MainWindow(SimpleGladeApp): for row in xrange(16): for col in xrange(16): matrix[row,col] = int(self.tabla[row,col].prendido) - #print int(self.tabla[row,col].prendido), - print (row,col), - print - print + 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 -- 2.43.0