aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-04-05 19:02:38 -0700
committerJosh Blum <josh@joshknows.com>2011-04-05 19:02:38 -0700
commitcbc62e4aee472eaf19b2f148092ce0137dbe917b (patch)
tree7edd743dc46c9265659d815028b26d07a4777cbc
parent0722225484cf3cd72db9220285e63accd7310eee (diff)
downloaduhd-cbc62e4aee472eaf19b2f148092ce0137dbe917b.tar.gz
uhd-cbc62e4aee472eaf19b2f148092ce0137dbe917b.tar.bz2
uhd-cbc62e4aee472eaf19b2f148092ce0137dbe917b.zip
usrp_n2xx_net_burner: remove thread from gui
tkinter is far too confused to handle threading and events the calls to update in the progress/sttus callbacks keep the gui refreshed
-rw-r--r--host/utils/usrp_n2xx_net_burner_gui.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/host/utils/usrp_n2xx_net_burner_gui.py b/host/utils/usrp_n2xx_net_burner_gui.py
index 50551e24a..3b414a918 100644
--- a/host/utils/usrp_n2xx_net_burner_gui.py
+++ b/host/utils/usrp_n2xx_net_burner_gui.py
@@ -16,7 +16,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-import threading
import usrp_n2xx_net_burner #import implementation
try:
import tkinter, tkinter.filedialog, tkinter.font, tkinter.messagebox
@@ -138,9 +137,7 @@ class USRPN2XXNetBurnerApp(tkinter.Frame):
def _burn(self):
self._disable_input()
- threading.Thread(target=self._burn_bg).start()
- def _burn_bg(self):
#grab strings from the gui
fw = self._fw_img_entry.get_filename()
fpga = self._fpga_img_entry.get_filename()
@@ -169,7 +166,11 @@ class USRPN2XXNetBurnerApp(tkinter.Frame):
def status_cb(status):
self._pbar.set(0.0) #status change, reset the progress
self._status.set("%s %s "%(status.title(), image_type))
- burner.set_callbacks(progress_cb=self._pbar.set, status_cb=status_cb)
+ self.update()
+ def progress_cb(progress):
+ self._pbar.set(progress)
+ self.update()
+ burner.set_callbacks(progress_cb=progress_cb, status_cb=status_cb)
burner.burn_fw(fw=fw_img, fpga=fpga_img, reset=False, safe=False)
if tkinter.messagebox.askyesno("Burn was successful!", "Reset the device?"):