OpenCores
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 336 to Rev 337
    Reverse comparison

Rev 336 → Rev 337

/xin/guiparent.py
1,6 → 1,6
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# generated by wxGlade 0.6.5 on Mon Jun 9 21:21:26 2014
# generated by wxGlade 0.6.5 on Thu Jun 12 23:43:57 2014
 
import wx
 
53,6 → 53,7
_icon = wx.EmptyIcon()
_icon.CopyFromBitmap(wx.Bitmap("grafica/phr-gui.ico", wx.BITMAP_TYPE_ANY))
self.SetIcon(_icon)
self.SetBackgroundColour(wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DFACE))
self.statusbar.SetStatusWidths([-1])
# statusbar fields
statusbar_fields = ["Listo"]
/xin/phrgui.py
32,7 → 32,7
 
 
def menu_item_ayuda_acerca_de_handler(self, event): # wxGlade: wg_parent_class.<event_handler>
description = """
description = u"""
PHR GUI es una interfaz gráfica que permite interactuar con
la Plataforma de Hardware Reconfigurable (CUDAR) a través
del software xc3sprog.
71,7 → 71,7
 
 
def menu_item_ayuda_hint_handler(self, event): # wxGlade: guiParent.<event_handler>
mensaje = """
mensaje = u"""
Procedimiento general para utilizar este programa:
 
1. Conecte el programador y presione en el botón \"Detectar\".
126,23 → 126,19
self.statusbar.SetFields(["Listo"])
 
 
def boton_transferir_thread(self):
def boton_transferir_thread(self, position):
## preparar entorno
wx.CallAfter(self.before_run)
 
position = str (position)
device_list_selection = self.list_box_dispositivos_conectados.GetSelections()
if len (device_list_selection) > 0:
position = str(device_list_selection[0])
else:
position = ""
if _platform == "linux" or _platform == "linux2":
# linux
command = "./xc3sprog/xc3sprog -v -c ftdi -p " + position + " \""+ self.text_ctrl_fichero.GetValue() + "\""
command = "./xc3sprog/lin/xc3sprog -v -c ftdi -p " + position + " \""+ self.text_ctrl_fichero.GetValue() + "\""
else:
# windows
subprocess.call ("copy \"" + self.text_ctrl_fichero.GetValue() + "\" fpgaFile", shell=True)
command = "xc3sprog\\xc3sprog.exe -v -L -c ftdi -p " + position + " fpgaFile:w:0:BIT"
command = "xc3sprog\\win\\xc3sprog -v -L -c ftdi -p " + position + " fpgaFile:w:0:BIT"
 
wx.CallAfter(self.text_ctrl_console.AppendText, command + "\n")
174,7 → 170,15
def boton_transferir_handler(self, event): # wxGlade: wg_parent_class.<event_handler>
thread.start_new_thread(self.boton_transferir_thread, ())
device_list_selection = self.list_box_dispositivos_conectados.GetSelections()
if len (device_list_selection) > 0:
position = device_list_selection[0]
else:
position = 0
thread.start_new_thread(self.boton_transferir_thread, (position,))
event.Skip()
182,18 → 186,18
## preparar entorno
wx.CallAfter(self.before_run, )
wx.CallAfter(self.list_box_dispositivos_conectados.Clear)
 
## accion
 
if _platform == "linux" or _platform == "linux2":
# linux
command = "./xc3sprog/xc3sprog -c ftdi"
command = "./xc3sprog/lin/xc3sprog -c ftdi"
else:
# windows
command = "xc3sprog\\xc3sprog -c ftdi -L -j -v"
command = "xc3sprog\\win\\xc3sprog -c ftdi -L -j -v"
 
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, ''):
214,8 → 218,9
 
process.stdout.close()
 
wx.CallAfter(self.list_box_dispositivos_conectados.SetSelection, 0)
if self.list_box_dispositivos_conectados.GetCount() >= 1:
wx.CallAfter(self.list_box_dispositivos_conectados.SetSelection, 0)
 
wx.CallAfter(self.text_ctrl_console.AppendText, "\nPHR>>> ")
 
## restaurar entorno
229,10 → 234,8
# end of class phrgui
 
if __name__ == "__main__":
app = wx.PySimpleApp(0)
wx.InitAllImageHandlers()
app = wx.App(False)
frame = phrgui(None, -1, "")
app.SetTopWindow(frame)
frame.Show()
app.MainLoop()
/xin/interfaz.wxg
1,5 → 1,5
<?xml version="1.0"?>
<!-- generated by wxGlade 0.6.5 on Mon Jun 9 21:21:16 2014 -->
<!-- generated by wxGlade 0.6.5 on Thu Jun 12 23:43:28 2014 -->
 
<application path="guiparent.py" name="" class="" option="0" language="python" top_window="main_frame" encoding="UTF-8" use_gettext="0" overwrite="1" use_new_namespace="1" for_version="2.8" is_template="0" indent_amount="3" indent_symbol="space" source_extension=".cpp" header_extension=".h">
<object class="guiParent" name="main_frame" base="EditFrame">
11,6 → 11,7
<centered>1</centered>
<sizehints>1</sizehints>
<statusbar>1</statusbar>
<background>wxSYS_COLOUR_3DFACE</background>
<object class="wxMenuBar" name="menubar" base="EditMenuBar">
<menus>
<menu name="" label="&amp;Ayuda">

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.