# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'micro_voltmeter.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again.  Do not edit this file unless you know what you are doing.


from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_Dialog(object):
    def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(797, 497)
        self.gridLayout = QtWidgets.QGridLayout(Dialog)
        self.gridLayout.setContentsMargins(1, 1, 1, 1)
        self.gridLayout.setSpacing(1)
        self.gridLayout.setObjectName("gridLayout")
        self.frame = QtWidgets.QFrame(Dialog)
        self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
        self.frame.setObjectName("frame")
        self.gaugeLayout = QtWidgets.QGridLayout(self.frame)
        self.gaugeLayout.setObjectName("gaugeLayout")
        self.gridLayout.addWidget(self.frame, 1, 1, 1, 1)
        self.msgwin = QtWidgets.QLabel(Dialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.msgwin.sizePolicy().hasHeightForWidth())
        self.msgwin.setSizePolicy(sizePolicy)
        self.msgwin.setObjectName("msgwin")
        self.gridLayout.addWidget(self.msgwin, 0, 1, 1, 1)
        self.voltmeterTab = QtWidgets.QTabWidget(Dialog)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.voltmeterTab.sizePolicy().hasHeightForWidth())
        self.voltmeterTab.setSizePolicy(sizePolicy)
        self.voltmeterTab.setObjectName("voltmeterTab")
        self.tabADS = QtWidgets.QWidget()
        self.tabADS.setObjectName("tabADS")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.tabADS)
        self.gridLayout_2.setContentsMargins(2, 2, 2, 2)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.ADSLabel_3 = QtWidgets.QLabel(self.tabADS)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.ADSLabel_3.sizePolicy().hasHeightForWidth())
        self.ADSLabel_3.setSizePolicy(sizePolicy)
        self.ADSLabel_3.setObjectName("ADSLabel_3")
        self.gridLayout_2.addWidget(self.ADSLabel_3, 2, 0, 1, 1)
        self.adsBox = QtWidgets.QComboBox(self.tabADS)
        self.adsBox.setMaximumSize(QtCore.QSize(80, 16777215))
        self.adsBox.setObjectName("adsBox")
        self.adsBox.addItem("")
        self.adsBox.addItem("")
        self.adsBox.addItem("")
        self.adsBox.addItem("")
        self.adsBox.addItem("")
        self.adsBox.addItem("")
        self.gridLayout_2.addWidget(self.adsBox, 1, 1, 1, 1)
        self.gainBox = QtWidgets.QComboBox(self.tabADS)
        self.gainBox.setObjectName("gainBox")
        self.gainBox.addItem("")
        self.gainBox.addItem("")
        self.gainBox.addItem("")
        self.gainBox.addItem("")
        self.gainBox.addItem("")
        self.gainBox.addItem("")
        self.gridLayout_2.addWidget(self.gainBox, 3, 1, 1, 1)
        self.ADSLabel = QtWidgets.QLabel(self.tabADS)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.ADSLabel.sizePolicy().hasHeightForWidth())
        self.ADSLabel.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.ADSLabel.setFont(font)
        self.ADSLabel.setAlignment(QtCore.Qt.AlignCenter)
        self.ADSLabel.setObjectName("ADSLabel")
        self.gridLayout_2.addWidget(self.ADSLabel, 0, 0, 1, 4)
        self.ADSLabel_4 = QtWidgets.QLabel(self.tabADS)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.ADSLabel_4.sizePolicy().hasHeightForWidth())
        self.ADSLabel_4.setSizePolicy(sizePolicy)
        self.ADSLabel_4.setObjectName("ADSLabel_4")
        self.gridLayout_2.addWidget(self.ADSLabel_4, 3, 0, 1, 1)
        self.ADSLabel_2 = QtWidgets.QLabel(self.tabADS)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.ADSLabel_2.sizePolicy().hasHeightForWidth())
        self.ADSLabel_2.setSizePolicy(sizePolicy)
        self.ADSLabel_2.setObjectName("ADSLabel_2")
        self.gridLayout_2.addWidget(self.ADSLabel_2, 1, 0, 1, 1)
        self.rateBox = QtWidgets.QComboBox(self.tabADS)
        self.rateBox.setMaximumSize(QtCore.QSize(80, 16777215))
        self.rateBox.setObjectName("rateBox")
        self.rateBox.addItem("")
        self.rateBox.addItem("")
        self.rateBox.addItem("")
        self.rateBox.addItem("")
        self.rateBox.addItem("")
        self.rateBox.addItem("")
        self.rateBox.addItem("")
        self.rateBox.addItem("")
        self.gridLayout_2.addWidget(self.rateBox, 2, 1, 1, 1)
        self.gridLayout_2.setColumnStretch(0, 1)
        self.gridLayout_2.setColumnStretch(1, 1)
        self.voltmeterTab.addTab(self.tabADS, "")
        self.tabA3 = QtWidgets.QWidget()
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.tabA3.sizePolicy().hasHeightForWidth())
        self.tabA3.setSizePolicy(sizePolicy)
        self.tabA3.setObjectName("tabA3")
        self.gridLayout_3 = QtWidgets.QGridLayout(self.tabA3)
        self.gridLayout_3.setContentsMargins(5, 5, 5, 5)
        self.gridLayout_3.setSpacing(5)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.pushButton_5 = QtWidgets.QPushButton(self.tabA3)
        self.pushButton_5.setMaximumSize(QtCore.QSize(200, 16777215))
        self.pushButton_5.setStyleSheet("background-color: rgb(192, 97, 203);")
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/control/download.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButton_5.setIcon(icon)
        self.pushButton_5.setObjectName("pushButton_5")
        self.gridLayout_3.addWidget(self.pushButton_5, 1, 1, 1, 1)
        self.resLabel = QtWidgets.QLabel(self.tabA3)
        self.resLabel.setObjectName("resLabel")
        self.gridLayout_3.addWidget(self.resLabel, 1, 0, 1, 1)
        self.gainText = QtWidgets.QLabel(self.tabA3)
        self.gainText.setObjectName("gainText")
        self.gridLayout_3.addWidget(self.gainText, 2, 0, 1, 1)
        self.gainLabel = QtWidgets.QLabel(self.tabA3)
        self.gainLabel.setObjectName("gainLabel")
        self.gridLayout_3.addWidget(self.gainLabel, 2, 1, 1, 1)
        self.offsetLabel = QtWidgets.QLabel(self.tabA3)
        self.offsetLabel.setObjectName("offsetLabel")
        self.gridLayout_3.addWidget(self.offsetLabel, 4, 1, 1, 1)
        self.textBrowser_3 = QtWidgets.QTextBrowser(self.tabA3)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.textBrowser_3.sizePolicy().hasHeightForWidth())
        self.textBrowser_3.setSizePolicy(sizePolicy)
        self.textBrowser_3.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.textBrowser_3.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)
        self.textBrowser_3.setObjectName("textBrowser_3")
        self.gridLayout_3.addWidget(self.textBrowser_3, 0, 0, 1, 2)
        self.pushButton_6 = QtWidgets.QPushButton(self.tabA3)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.pushButton_6.sizePolicy().hasHeightForWidth())
        self.pushButton_6.setSizePolicy(sizePolicy)
        self.pushButton_6.setMaximumSize(QtCore.QSize(200, 16777215))
        self.pushButton_6.setStyleSheet("background-color: rgb(192, 97, 203);")
        self.pushButton_6.setIcon(icon)
        self.pushButton_6.setObjectName("pushButton_6")
        self.gridLayout_3.addWidget(self.pushButton_6, 3, 1, 1, 1)
        self.textBrowser_5 = QtWidgets.QTextBrowser(self.tabA3)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Maximum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.textBrowser_5.sizePolicy().hasHeightForWidth())
        self.textBrowser_5.setSizePolicy(sizePolicy)
        self.textBrowser_5.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
        self.textBrowser_5.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)
        self.textBrowser_5.setObjectName("textBrowser_5")
        self.gridLayout_3.addWidget(self.textBrowser_5, 8, 0, 1, 2)
        self.textBrowser = QtWidgets.QTextBrowser(self.tabA3)
        self.textBrowser.setObjectName("textBrowser")
        self.gridLayout_3.addWidget(self.textBrowser, 3, 0, 2, 1)
        self.voltmeterTab.addTab(self.tabA3, "")
        self.gridLayout.addWidget(self.voltmeterTab, 0, 0, 2, 1)
        self.gridLayout.setColumnStretch(0, 1)
        self.gridLayout.setColumnStretch(1, 1)

        self.retranslateUi(Dialog)
        self.voltmeterTab.setCurrentIndex(0)
        self.gainBox.setCurrentIndex(5)
        self.rateBox.setCurrentIndex(2)
        self.rateBox.currentIndexChanged['int'].connect(Dialog.rateChanged) # type: ignore
        self.gainBox.currentIndexChanged['int'].connect(Dialog.gainChanged) # type: ignore
        self.voltmeterTab.currentChanged['int'].connect(Dialog.setVoltmeter) # type: ignore
        self.pushButton_5.clicked.connect(Dialog.setA3Gain) # type: ignore
        self.pushButton_6.clicked.connect(Dialog.A3Zero) # type: ignore
        QtCore.QMetaObject.connectSlotsByName(Dialog)

    def retranslateUi(self, Dialog):
        _translate = QtCore.QCoreApplication.translate
        Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
        self.msgwin.setText(_translate("Dialog", "."))
        self.ADSLabel_3.setText(_translate("Dialog", "SAMPLING RATE"))
        self.adsBox.setItemText(0, _translate("Dialog", "ADS0"))
        self.adsBox.setItemText(1, _translate("Dialog", "ADS1"))
        self.adsBox.setItemText(2, _translate("Dialog", "ADS2"))
        self.adsBox.setItemText(3, _translate("Dialog", "ADS3"))
        self.adsBox.setItemText(4, _translate("Dialog", "ADS01"))
        self.adsBox.setItemText(5, _translate("Dialog", "ADS23"))
        self.gainBox.setItemText(0, _translate("Dialog", "GAIN_2/3 (6 V)"))
        self.gainBox.setItemText(1, _translate("Dialog", "UNITY (4 V)"))
        self.gainBox.setItemText(2, _translate("Dialog", "2X (2 V)"))
        self.gainBox.setItemText(3, _translate("Dialog", "4X (1 V)"))
        self.gainBox.setItemText(4, _translate("Dialog", "8X (512mV)"))
        self.gainBox.setItemText(5, _translate("Dialog", "16X (256mV)"))
        self.ADSLabel.setText(_translate("Dialog", "ADS1115 16 bit ADC:"))
        self.ADSLabel_4.setText(_translate("Dialog", "INPUT GAIN / RANGE"))
        self.ADSLabel_2.setText(_translate("Dialog", "INPUT CHANNEL"))
        self.rateBox.setItemText(0, _translate("Dialog", "8 SPS"))
        self.rateBox.setItemText(1, _translate("Dialog", "16 SPS"))
        self.rateBox.setItemText(2, _translate("Dialog", "32 SPS"))
        self.rateBox.setItemText(3, _translate("Dialog", "64 SPS"))
        self.rateBox.setItemText(4, _translate("Dialog", "128 SPS"))
        self.rateBox.setItemText(5, _translate("Dialog", "250 SPS"))
        self.rateBox.setItemText(6, _translate("Dialog", "475 SPS"))
        self.rateBox.setItemText(7, _translate("Dialog", "860 SPS"))
        self.voltmeterTab.setTabText(self.voltmeterTab.indexOf(self.tabADS), _translate("Dialog", "ADS1115 16-bit ADC"))
        self.pushButton_5.setText(_translate("Dialog", "Update Gain"))
        self.resLabel.setToolTip(_translate("Dialog", "Connect the Rg resistor between\n"
"SEN and GND to measure it accurately first"))
        self.resLabel.setText(_translate("Dialog", "Measure R(SEN-GND):"))
        self.gainText.setText(_translate("Dialog", "Applied Gain:"))
        self.gainLabel.setText(_translate("Dialog", "1000 x"))
        self.offsetLabel.setText(_translate("Dialog", "0 uV"))
        self.textBrowser_3.setHtml(_translate("Dialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Ubuntu\'; font-size:11pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">A3 input has a manually configurable gain. To amplify signals, keep a known value resistor(R) connected between Rg and GND, and the resultant gain is given by (1+10000/R). For too small values of R, the opamp offset error will amplify, and an offset correction must be measured and applied.</p></body></html>"))
        self.pushButton_6.setText(_translate("Dialog", "Note Offset"))
        self.textBrowser_5.setHtml(_translate("Dialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Ubuntu\'; font-size:11pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt;\">TO MEASURE:</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt;\">+ Connect 100 Ohms Between Rg and GND(For 100x gain)</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:10pt;\">+ Connect Voltage Source between A3 and GND.</span></p></body></html>"))
        self.textBrowser.setHtml(_translate("Dialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Ubuntu\'; font-size:11pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Connect 100 Ohms b/w Rg and GND, and connect A3 to GND.</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">click to correct the offset error:</p></body></html>"))
        self.voltmeterTab.setTabText(self.voltmeterTab.indexOf(self.tabA3), _translate("Dialog", "A3(With manual gain)"))
from . import resplus_rc
