Patrick Schreiber пре 8 година
родитељ
комит
681b3d06c1
3 измењених фајлова са 12 додато и 4 уклоњено
  1. 5 3
      base/backendinterface.py
  2. 3 1
      base/controlwidget.py
  3. 4 0
      kcg.py

+ 5 - 3
base/backendinterface.py

@@ -110,6 +110,8 @@ def _bif_continuous_read_is_enabled(popup_title_text=None):
 def _bif_status_readout():
     # TODO: NOTE: Problem with this is that certain buttons will be greyed out until other buttons are pressed
     # TODO: even if only the gui is restarted and the board is in the same state
+    if kcgw.testing:
+        return # TODO: IMPORTANT REMOVE THIS !!!!!
     if board.is_active():
         Buttons.setEnabled("after_start", True)
         Buttons.setEnabled("start_board", False)
@@ -945,9 +947,9 @@ def _bif_start_time_scan(c_frm, c_to, f_frm, f_to, timescan_progressbar, plot_fu
                         board.flush_dma()
                         # ----------------------------------------------
 
-                        #f_name = "/home/blaxxun/Documents/Hiwi/KaptureSimulator/timescan/" + str(coarse) + "_" + str(fine) + ".str"
-                        #f = open(f_name, 'r')
-                        #data_raw = f.read()
+                        # f_name = "/home/blaxxun/Documents/Hiwi/KaptureSimulator/timescan/" + str(coarse) + "_" + str(fine) + ".str"
+                        # f = open(f_name, 'r')
+                        # data_raw = f.read()
 
                         #Sadly, the PCI software also outputs the Information, that it has written data to the desired file.
                         #This is recorded by our software and needs to be removed, so we split the returned string at the

+ 3 - 1
base/controlwidget.py

@@ -199,7 +199,9 @@ class ControlWidget(kcgw.KCGWidgets):
         self.set_default_button = self.createButton(text=tr("Button", "Set Defaults"), connect=bif.bk_set_defaults)
         self.soft_reset_button = self.createButton(text=tr("Button", "Soft Reset"), connect=bif.bk_soft_reset)
         self.off_button = self.createButton(text=tr("Button", "Board Off"), connect=bif.bk_stop_board)
-        self.all_in_one_button = self.createButton(text=tr("Button", "Prepare Board"), connect=self.all_in_one)
+        self.all_in_one_button = self.createButton(text=tr("Button", "Prepare Board"), connect=self.all_in_one,
+                                                   tooltip=tr("Tooltip", "Start, Calibrate, Synchronize and set Defaults\nCtrl+A"))
+        self.all_in_one_button.setShortcut("Ctrl+A")
         self.all_in_one_button.setObjectName("all_in_one")
         self.off_button.setObjectName("off")
 

+ 4 - 0
kcg.py

@@ -15,6 +15,10 @@ import base.kcg as kcg
 # exception_log_handler = Erax('http://psraspi.no-ip.biz:5000/insert/78e55a9524a191f7628f82a20bcaa167:kcg')
 # exception_log_handler.install()
 
+if 'testing' in sys.argv:
+    kcgw.testing = True
+else:
+    kcgw.testing = False
 
 gui=None
 def main():