소스 검색

Merge branch 'kapture2' of http://git.ipe.kit.edu/patrick/KaptureControlGui into kapture2

# Conflicts:
#	KCG/base/backend/board/actions.py
#	KCG/base/backend/board/boards_connected.py
#	KCG/base/backend/board/sequences.py
#	KCG/base/backend/dataset.py
#	KCG/base/backend/io.py
#	KCG/base/backendinterface.py
#	KCG/base/bitsTable.py
#	KCG/base/controlwidget.py
#	KCG/base/groupedelements.py
#	KCG/base/kcg.py
#	KCG/base/leftbar.py
#	KCG/base/log.py
#	KCG/base/plotWidget.py
#	KCG/base/storage.py
#	KCG/config.py
#	KCG/default_config.cfg
#	KCG/kcg.py
#	KCG/widgets/example_widget.py
#	KCG/widgets/initialconfig.py
#	KCG/widgets/singleread.py
#	KCG/widgets/timingWidget.py
#	kcg.py
Matze 6 년 전
부모
커밋
ae893b4ebb

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
KCG/Documentation/source/_themes/sphinx_rtd_theme/static/css/badge_only.css


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
KCG/Documentation/source/_themes/sphinx_rtd_theme/static/css/theme.css


+ 6 - 2
KCG/base/backend/board/actions.py

@@ -18,13 +18,17 @@ def acquire_data(board_id, filename, simulate=False):
     if simulate:
         start_pilot_bunch_emulator(board_id)
 
-    flush_dma(board_id)
+    #NOTE: New Picosecond Capture does not need flush any more
+    #Get firmware info from registers and decide if we want to flush
+    #or not
+
+    #flush_dma(board_id)
     start_acquisition(board_id)
     wait_for_revolutions(board_id)
     stop_acquisition(board_id)
     enable_transfer(board_id)
     pci.read(board_id, dma='dma0', destination=filename)
-    flush_dma(board_id)
+    #flush_dma(board_id)
 
 
 def data_reset(board_id):

+ 3 - 1
KCG/base/backend/board/sequences.py

@@ -100,7 +100,9 @@ def calibration_sequence(board_id):
     yield True
 
     # Set R15 ...
-    pci.write(board_id, '0xD000100F', '0x9060')
+    #New frequency divider
+    pci.write(board_id, '0xCC00100F', '0x9060')
+    #pci.write(board_id, '0xD000100F', '0x9060')
     yield True
 
 

+ 4 - 4
KCG/base/bitsTable.py

@@ -394,10 +394,10 @@ class AdvancedBoardInterface(QtGui.QWidget):
         table.set_label(12, 13, "ADC_4", QtCore.Qt.yellow)
         table.grey_out_column(11)
         table.grey_out_column(10)
-        table.grey_out_column(9)
-        table.grey_out_column(8)
-        table.grey_out_column(7)
-        table.grey_out_column(6)
+        table.set_label(9, 9, "Clock Selection", QtCore.Qt.yellow)
+        table.set_label(8, 8, "Sampling", QtCore.Qt.green)
+        table.set_label(7, 7, "Reset", QtCore.Qt.yellow)
+        table.set_label(6, 6, "ADC_CNT", QtCore.Qt.yellow)
         table.grey_out_column(5)
         table.grey_out_column(4)
         table.set_label(3, 3, "Header", QtCore.Qt.green)

+ 14 - 4
KCG/widgets/initialconfig.py

@@ -111,6 +111,8 @@ class ConfigEntry(kcgw.KCGWidgets):
         :param mark: mark false entered values?
         :return: -
         """
+        if not self.value.isEnabled():
+            return True
         if self.multiline:
             try:
                 v, e = self.san(str(self.value.toPlainText()))
@@ -146,6 +148,8 @@ class ConfigEntry(kcgw.KCGWidgets):
         if self.type == str:
 
             val.replace('"', '\'')
+            if len(val) == 0:
+                return "", False
             if val[0] == "'":
                 if not val[-1] == "'":
                     val += "'"
@@ -166,10 +170,13 @@ class ConfigEntry(kcgw.KCGWidgets):
         comment = ''
         for line in str(self.comment.text()).split('\n'):
             comment += "# " + line + '\n'
-        if self.multiline:
-            val = self.value.toPlainText()
+        if self.value.isEnabled():
+            if self.multiline:
+                val = self.value.toPlainText()
+            else:
+                val = self.value.text()
         else:
-            val = self.value.text()
+            val = "'\"disabled\"'"
 
         val, e = self.san(val)
 
@@ -314,16 +321,19 @@ class ConfigSetup(kcgw.KCGWidgets):
         self.logging_label = self.createLabel("Logging")
         self.logging_label.setStyleSheet("font-size:20pt;")
         self.layout.addWidget(self.logging_label)
+        
         self.configs.append("\n[Logging]")
+        self.logging_entries = []
         for comm, conf, type in zip(self.logging_comments, self.logging_configs, self.logging_types):
             if conf == 'epics_log_entry_pvs' or conf == 'default_log_entries':
                 self.configs.append(ConfigEntry(comm, conf, type, multiline=True))
             else:
                 self.configs.append(ConfigEntry(comm, conf, type))
             self.layout.addWidget(self.configs[-1])
+            self.logging_entries.append(self.configs[-1])
 
         self.scrollWidget.setWidget(self.wid)
-
+       
     def save(self):
         """
         Save the configuration entered in the config window to a configuration file

+ 0 - 4
kcg.py

@@ -1,7 +1,3 @@
 #!/usr/bin/python
-import sip #needed for pyQT4 to run with python 3
-sip.setapi('QString', 1)
-sip.setapi('QStringList', 1)
-
 import KCG.kcg as k
 k.run()

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.