import gtk
from simplegladeapp import SimpleGladeApp
from simplegladeapp import bindtextdomain
-from dispatcher import Dispatcher
+#from dispatcher import Dispatcher
from led import Led
import etherled
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()
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