From: Leandro Lucarella Date: Tue, 1 Nov 2005 18:20:00 +0000 (+0000) Subject: Se elimina dependencia de dispatcher y se implementa el recibir. X-Git-Tag: 0.1-recibe-matriz-raw-por-udp~56 X-Git-Url: https://git.llucax.com/z.facultad/66.09/etherled.git/commitdiff_plain/e773ed11aa9589385dc3d1bd31155570cc83d7d8?ds=sidebyside Se elimina dependencia de dispatcher y se implementa el recibir. --- 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