From e6fcbf4ae90f2ece4f2bd6ea5b9eb1e9a18d1534 Mon Sep 17 00:00:00 2001 From: jithinbp Date: Sat, 6 May 2017 18:09:41 +0530 Subject: [PATCH] Fixed sensorpendulum app in the Physics section Made compatible with non-blocking calls defined in PSL.Peripherals.I2C . Bug fixes in template file. included saveData button to UI Fixes #93 --- .../B_physics/templates/template_transient.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/psl_res/GUI/D_PHYSICS/B_physics/templates/template_transient.py b/psl_res/GUI/D_PHYSICS/B_physics/templates/template_transient.py index fb17da50..e1a0b990 100644 --- a/psl_res/GUI/D_PHYSICS/B_physics/templates/template_transient.py +++ b/psl_res/GUI/D_PHYSICS/B_physics/templates/template_transient.py @@ -62,12 +62,6 @@ def setupUi(self, MainWindow): self.frame_3.setObjectName(_fromUtf8("frame_3")) self.gridLayout = QtGui.QGridLayout(self.frame_3) self.gridLayout.setObjectName(_fromUtf8("gridLayout")) - self.pushButton_4 = QtGui.QPushButton(self.frame_3) - self.pushButton_4.setObjectName(_fromUtf8("pushButton_4")) - self.gridLayout.addWidget(self.pushButton_4, 0, 0, 1, 1) - self.pushButton = QtGui.QPushButton(self.frame_3) - self.pushButton.setObjectName(_fromUtf8("pushButton")) - self.gridLayout.addWidget(self.pushButton, 0, 1, 1, 1) self.frame_6 = QtGui.QFrame(self.frame_3) self.frame_6.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_6.setFrameShadow(QtGui.QFrame.Raised) @@ -86,6 +80,9 @@ def setupUi(self, MainWindow): self.horizontalSlider.setObjectName(_fromUtf8("horizontalSlider")) self.horizontalLayout_2.addWidget(self.horizontalSlider) self.gridLayout.addWidget(self.frame_6, 1, 0, 1, 2) + self.pushButton_4 = QtGui.QPushButton(self.frame_3) + self.pushButton_4.setObjectName(_fromUtf8("pushButton_4")) + self.gridLayout.addWidget(self.pushButton_4, 0, 0, 1, 1) self.horizontalLayout.addWidget(self.frame_3) self.frame_5 = QtGui.QFrame(self.frame) self.frame_5.setFrameShape(QtGui.QFrame.StyledPanel) @@ -172,17 +169,15 @@ def setupUi(self, MainWindow): QtCore.QObject.connect(self.pushButton_6, QtCore.SIGNAL(_fromUtf8("clicked()")), MainWindow.showData) QtCore.QObject.connect(self.horizontalSlider, QtCore.SIGNAL(_fromUtf8("valueChanged(int)")), MainWindow.setTimebase) QtCore.QObject.connect(self.pushButton_7, QtCore.SIGNAL(_fromUtf8("clicked()")), MainWindow.saveData) - QtCore.QObject.connect(self.pushButton_4, QtCore.SIGNAL(_fromUtf8("clicked()")), MainWindow.ZeroToFive) - QtCore.QObject.connect(self.pushButton, QtCore.SIGNAL(_fromUtf8("clicked()")), MainWindow.FiveToZero) + QtCore.QObject.connect(self.pushButton_4, QtCore.SIGNAL(_fromUtf8("clicked()")), MainWindow.run) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None)) self.widgetFrameOuter.setProperty("class", _translate("MainWindow", "PeripheralCollection", None)) self.frame.setProperty("class", _translate("MainWindow", "PeripheralCollectionInner", None)) - self.pushButton_4.setText(_translate("MainWindow", "0 -> 5 V", None)) - self.pushButton.setText(_translate("MainWindow", "5 -> 0 V", None)) self.tgLabel.setText(_translate("MainWindow", "time: mS", None)) + self.pushButton_4.setText(_translate("MainWindow", "Acquire", None)) self.pushButton_5.setText(_translate("MainWindow", "Fit selected region", None)) self.pushButton_6.setText(_translate("MainWindow", "Show Fit Params", None)) self.pushButton_7.setText(_translate("MainWindow", "Save Data", None))