URL
https://opencores.org/ocsvn/phr/phr/trunk
Subversion Repositories phr
Compare Revisions
- This comparison shows the changes necessary to convert path
/phr/trunk/codigo/gui
- from Rev 213 to Rev 217
- ↔ Reverse comparison
Rev 213 → Rev 217
/linux/phr-gui.py
6,6 → 6,7
# imports by maximiq |
import os # se usa para el dialogo de abrir fichero |
import subprocess # para interactuar con el shell |
import thread # to prevent gui blocking |
|
##################################### |
# Para que funcione mejor en Linux |
191,15 → 192,25
|
event.Skip() |
|
def boton_conf_fpga(self, event): # wxGlade: MyFrame.<event_handler> |
#funcion editada por maximiq |
|
## preparar entorno |
def before_run (self): |
## preparar entorno para los eventos conf_fpga prog_prom comprobar_conexion |
self.button_conf_fpga.Disable() |
self.button_prog_prom.Disable() |
self.button_conection.Disable() |
self.button_empty.Disable() |
self.frame_1_statusbar.SetFields(["Espere ..."]) |
|
def after_run (self): |
## restaurar entorno |
self.button_conf_fpga.Enable() |
self.button_prog_prom.Enable() |
self.button_conection.Enable() |
self.button_empty.Enable() |
self.frame_1_statusbar.SetFields(["Listo"]) |
|
def boton_conf_fpga_thread(self): |
## preparar entorno |
wx.CallAfter(self.before_run) |
|
## accion |
# se copia el fichero de programacion al directorio local |
208,48 → 219,43
# se ejecuta el xc3sprog |
command = "./xc3sprog/xc3sprog -v -c ftdi -p 0 \""+ self.text_ctrl_file.GetValue() + "\":w:0:BIT" |
|
self.text_ctrl_console.AppendText(command + "\n") |
wx.CallAfter(self.text_ctrl_console.AppendText, command + "\n") |
|
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) |
|
for line in iter(process.stdout.readline, ''): |
self.text_ctrl_console.AppendText(line) |
wx.CallAfter(self.text_ctrl_console.AppendText, line) |
process.stdout.close() |
|
self.text_ctrl_console.AppendText("\nPHR>>> ") |
wx.CallAfter(self.text_ctrl_console.AppendText, "\nPHR>>> ") |
|
## restaurar entorno |
self.button_conf_fpga.Enable() |
self.button_prog_prom.Enable() |
self.button_conection.Enable() |
self.button_empty.Enable() |
self.frame_1_statusbar.SetFields(["Listo"]) |
wx.CallAfter(self.after_run) |
|
|
def boton_conf_fpga(self, event): # wxGlade: MyFrame.<event_handler> |
#funcion editada por maximiq |
thread.start_new_thread(self.boton_conf_fpga_thread, ()) |
event.Skip() |
|
def boton_prog_prom(self, event): # wxGlade: MyFrame.<event_handler> |
def boton_prog_prom_thread(self): |
#funcion editada por maximiq |
|
## preparar entorno |
self.button_conf_fpga.Disable() |
self.button_prog_prom.Disable() |
self.button_conection.Disable() |
self.button_empty.Disable() |
self.frame_1_statusbar.SetFields(["Espere ..."]) |
wx.CallAfter(self.before_run) |
|
## accion |
|
# se copia el fichero de programacion al directorio local |
#subprocess.call ("copy \"" + self.text_ctrl_file.GetValue() + "\" fpgaFile", shell=True) |
|
command = "./xc3sprog/xc3sprog -v -c ftdi -p 1 \"" + self.text_ctrl_file.GetValue() + "\":w:0:BIT" |
|
self.text_ctrl_console.AppendText(command + "\n") |
|
wx.CallAfter(self.text_ctrl_console.AppendText, command + "\n") |
|
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) |
|
for line in iter(process.stdout.readline, ''): |
self.text_ctrl_console.AppendText(line) |
wx.CallAfter(self.text_ctrl_console.AppendText, line) |
process.stdout.close() |
# line = '' |
# while True: |
262,47 → 268,41
# self.text_ctrl_console.AppendText(line) |
# line = '' |
|
self.text_ctrl_console.AppendText("\nPHR>>> ") |
wx.CallAfter(self.text_ctrl_console.AppendText, "\nPHR>>> ") |
|
## restaurar entorno |
self.button_conf_fpga.Enable() |
self.button_prog_prom.Enable() |
self.button_conection.Enable() |
self.button_empty.Enable() |
self.frame_1_statusbar.SetFields(["Listo"]) |
|
event.Skip() |
wx.CallAfter(self.after_run) |
|
def boton_conexion(self, event): # wxGlade: MyFrame.<event_handler> |
|
def boton_prog_prom(self, event): # wxGlade: MyFrame.<event_handler> |
#funcion editada por maximiq |
thread.start_new_thread(self.boton_prog_prom_thread, ()) |
event.Skip() |
|
def boton_conexion_thread (self): |
## preparar entorno |
self.button_conf_fpga.Disable() |
self.button_prog_prom.Disable() |
self.button_conection.Disable() |
self.button_empty.Disable() |
self.frame_1_statusbar.SetFields(["Espere ..."]) |
wx.CallAfter(self.before_run, ) |
|
## accion |
command = "./xc3sprog/xc3sprog -c ftdi" # the shell command |
|
self.text_ctrl_console.AppendText(command + "\n") |
wx.CallAfter(self.text_ctrl_console.AppendText, command + "\n") |
|
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) |
|
for line in iter(process.stdout.readline, ''): |
self.text_ctrl_console.AppendText(line) |
wx.CallAfter(self.text_ctrl_console.AppendText, line) |
process.stdout.close() |
|
self.text_ctrl_console.AppendText("\nPHR>>> ") |
wx.CallAfter(self.text_ctrl_console.AppendText, "\nPHR>>> ") |
|
## restaurar entorno |
self.button_conf_fpga.Enable() |
self.button_prog_prom.Enable() |
self.button_conection.Enable() |
self.button_empty.Enable() |
self.frame_1_statusbar.SetFields(["Listo"]) |
|
wx.CallAfter(self.after_run, ) |
|
|
def boton_conexion(self, event): # wxGlade: MyFrame.<event_handler> |
#funcion editada por maximiq |
thread.start_new_thread(self.boton_conexion_thread, ()) |
event.Skip() |
|
def boton_borrar(self, event): # wxGlade: MyFrame.<event_handler> |
/windows/gui/phr-gui.py
6,6 → 6,7
# imports by maximiq |
import os # se usa para el dialogo de abrir fichero |
import subprocess # para interactuar con el shell |
import thread # to prevent gui blocking |
|
##################################### |
# Para que funcione mejor en Linux |
114,7 → 115,8
la Plataforma de Hardware Reconfigurable (desarrollada en el |
CUDAR) a traves del software xc3sprog. |
|
Revision (SVN) 209. |
Revision (SVN) 217. |
(EN DESARROLLO) |
""" |
|
licence = """ |
191,15 → 193,25
|
event.Skip() |
|
def boton_conf_fpga(self, event): # wxGlade: MyFrame.<event_handler> |
#funcion editada por maximiq |
|
## preparar entorno |
def before_run (self): |
## preparar entorno para los eventos conf_fpga prog_prom comprobar_conexion |
self.button_conf_fpga.Disable() |
self.button_prog_prom.Disable() |
self.button_conection.Disable() |
self.button_empty.Disable() |
self.frame_1_statusbar.SetFields(["Espere ..."]) |
|
def after_run (self): |
## restaurar entorno |
self.button_conf_fpga.Enable() |
self.button_prog_prom.Enable() |
self.button_conection.Enable() |
self.button_empty.Enable() |
self.frame_1_statusbar.SetFields(["Listo"]) |
|
def boton_conf_fpga_thread(self): |
## preparar entorno |
wx.CallAfter(self.before_run) |
|
## accion |
# se copia el fichero de programacion al directorio local |
207,35 → 219,31
|
# se ejecuta el xc3sprog |
command = "xc3sprog\\xc3sprog -v -L -c ftdi -p 0 fpgaFile:w:0:BIT" |
|
self.text_ctrl_console.AppendText(command + "\n") |
|
wx.CallAfter(self.text_ctrl_console.AppendText, command + "\n") |
|
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) |
|
for line in iter(process.stdout.readline, ''): |
self.text_ctrl_console.AppendText(line) |
wx.CallAfter(self.text_ctrl_console.AppendText, line) |
process.stdout.close() |
|
self.text_ctrl_console.AppendText("\nPHR>>> ") |
wx.CallAfter(self.text_ctrl_console.AppendText, "\nPHR>>> ") |
|
## restaurar entorno |
self.button_conf_fpga.Enable() |
self.button_prog_prom.Enable() |
self.button_conection.Enable() |
self.button_empty.Enable() |
self.frame_1_statusbar.SetFields(["Listo"]) |
wx.CallAfter(self.after_run) |
|
|
def boton_conf_fpga(self, event): # wxGlade: MyFrame.<event_handler> |
#funcion editada por maximiq |
thread.start_new_thread(self.boton_conf_fpga_thread, ()) |
event.Skip() |
|
def boton_prog_prom(self, event): # wxGlade: MyFrame.<event_handler> |
def boton_prog_prom_thread(self): |
#funcion editada por maximiq |
|
## preparar entorno |
self.button_conf_fpga.Disable() |
self.button_prog_prom.Disable() |
self.button_conection.Disable() |
self.button_empty.Disable() |
self.frame_1_statusbar.SetFields(["Espere ..."]) |
wx.CallAfter(self.before_run) |
|
## accion |
|
243,9 → 251,9
subprocess.call ("copy \"" + self.text_ctrl_file.GetValue() + "\" fpgaFile", shell=True) |
|
command = "xc3sprog\\xc3sprog.exe -v -L -c ftdi -p 1 fpgaFile:w:0:BIT" |
|
self.text_ctrl_console.AppendText(command + "\n") |
|
wx.CallAfter(self.text_ctrl_console.AppendText, command + "\n") |
|
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) |
|
line = '' |
256,50 → 264,42
if out != '' and out != '\x0a': |
line = line + out |
if out == '\x0d': |
self.text_ctrl_console.AppendText(line) |
wx.CallAfter(self.text_ctrl_console.AppendText, line) |
line = '' |
|
self.text_ctrl_console.AppendText("\nPHR>>> ") |
wx.CallAfter(self.text_ctrl_console.AppendText, "\nPHR>>> ") |
|
## restaurar entorno |
self.button_conf_fpga.Enable() |
self.button_prog_prom.Enable() |
self.button_conection.Enable() |
self.button_empty.Enable() |
self.frame_1_statusbar.SetFields(["Listo"]) |
|
event.Skip() |
wx.CallAfter(self.after_run) |
|
def boton_conexion(self, event): # wxGlade: MyFrame.<event_handler> |
def boton_prog_prom(self, event): # wxGlade: MyFrame.<event_handler> |
#funcion editada por maximiq |
|
thread.start_new_thread(self.boton_prog_prom_thread, ()) |
event.Skip() |
|
def boton_conexion_thread (self): |
## preparar entorno |
self.button_conf_fpga.Disable() |
self.button_prog_prom.Disable() |
self.button_conection.Disable() |
self.button_empty.Disable() |
self.frame_1_statusbar.SetFields(["Espere ..."]) |
wx.CallAfter(self.before_run, ) |
|
## accion |
command = "xc3sprog\\xc3sprog -c ftdi -L -j -v" # the shell command |
|
self.text_ctrl_console.AppendText(command + "\n") |
wx.CallAfter(self.text_ctrl_console.AppendText, command + "\n") |
|
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) |
|
for line in iter(process.stdout.readline, ''): |
self.text_ctrl_console.AppendText(line) |
wx.CallAfter(self.text_ctrl_console.AppendText, line) |
process.stdout.close() |
|
self.text_ctrl_console.AppendText("\nPHR>>> ") |
wx.CallAfter(self.text_ctrl_console.AppendText, "\nPHR>>> ") |
|
## restaurar entorno |
self.button_conf_fpga.Enable() |
self.button_prog_prom.Enable() |
self.button_conection.Enable() |
self.button_empty.Enable() |
self.frame_1_statusbar.SetFields(["Listo"]) |
|
wx.CallAfter(self.after_run, ) |
|
def boton_conexion(self, event): # wxGlade: MyFrame.<event_handler> |
#funcion editada por maximiq |
thread.start_new_thread(self.boton_conexion_thread, ()) |
event.Skip() |
|
def boton_borrar(self, event): # wxGlade: MyFrame.<event_handler> |
/windows/gui/nis/phr-gui-01r217_instalar.exe
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
windows/gui/nis/phr-gui-01r217_instalar.exe
Property changes :
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: phr-gui-linux.tar.gz
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream