Пример #1
0
    def __init__(self, main=None, unique='X'):
        WidgetUI.__init__(self, main, 'axis_ui.ui')

        self.axis = unique

        self.timer = QTimer(self)

        self.horizontalSlider_power.valueChanged.connect(self.power_changed)
        self.horizontalSlider_degrees.valueChanged.connect(
            lambda val: self.serialWrite("degrees=" + str(val) + "\n"))
        self.horizontalSlider_esgain.valueChanged.connect(
            lambda val: self.serialWrite("esgain=" + str(val) + "\n"))
        self.horizontalSlider_fxratio.valueChanged.connect(
            self.fxratio_changed)
        self.horizontalSlider_idle.valueChanged.connect(
            lambda val: self.serialWrite("idlespring=" + str(val) + "\n"))
        self.horizontalSlider_damper.valueChanged.connect(
            lambda val: self.serialWrite("axisdamper=" + str(val) + "\n"))

        self.spinBox_range.editingFinished.connect(
            self.rangeChanged)  # don't update while typing

        #self.comboBox_encoder.currentIndexChanged.connect(self.encoderIndexChanged)

        self.checkBox_invert.stateChanged.connect(lambda val: self.serialWrite(
            "invert=" + ("0" if val == 0 else "1") + "\n"))

        self.pushButton_submit_hw.clicked.connect(self.submitHw)
        self.pushButton_submit_enc.clicked.connect(self.submitEnc)

        tabId = self.main.addTab(self, "FFB Axis")

        self.pushButton_center.clicked.connect(
            lambda: self.serialWrite("zeroenc\n"))
Пример #2
0
    def __init__(self, main=None):

        WidgetUI.__init__(self, main, 'baseclass.ui')
        self.setEnabled(False)
        self.pushButton_reboot.clicked.connect(self.reboot)
        self.pushButton_dfu.clicked.connect(self.dfu)
        self.pushButton_reset.clicked.connect(self.factoryResetBtn)
        self.pushButton_save.clicked.connect(self.saveClicked)
Пример #3
0
    def __init__(self, main=None):
        WidgetUI.__init__(self, main, 'midi.ui')

        self.initUi()
        self.horizontalSlider_power.valueChanged.connect(
            lambda val: self.main.comms.serialWrite("power=" + str(val)))
        self.horizontalSlider_amp.valueChanged.connect(
            lambda val: self.main.comms.serialWrite("range=" + str(val)))
 def __init__(self, main=None, unique=None):
     WidgetUI.__init__(self, main, 'odrive.ui')
     self.main = main  #type: main.MainUi
     self.timer = QTimer(self)
     self.initUi()
     self.pushButton_apply.clicked.connect(self.apply)
     #self.pushButton_anticogging.clicked.connect(self.antigoggingBtn) #TODO test first
     self.timer.timeout.connect(self.updateTimer)
     self.prefix = unique
Пример #5
0
 def __init__(self, main=None, parent=None):
     WidgetUI.__init__(self, parent, 'errors.ui')
     self.main = main
     self.parent = parent
     main.comms.serialRegisterCallback("Err", self.errorCallback)
     self.pushButton_refresh.clicked.connect(self.readErrors)
     self.pushButton_clearAll.clicked.connect(self.clearErrors)
     self.errors = ErrorsModel(self.tableView)
     self.tableView.setModel(self.errors)
     header = self.tableView.horizontalHeader()
     header.setStretchLastSection(True)
Пример #6
0
    def __init__(self, main=None,device = None):
            WidgetUI.__init__(self, main,'dfu.ui')
            self.groupbox_controls.setEnabled(False)
            self.main = main #type: main.MainUi

            self.pushButton_filechooser.clicked.connect(self.fileClicked)
            self.pushButton_fullerase.clicked.connect(self.fullEraseClicked)
            self.pushButton_upload.clicked.connect(self.uploadClicked)

            self.devFound = False
            self.timer = QTimer(self)
            self.timer.timeout.connect(self.initUi)
            self.timer.start(1000)
Пример #7
0
    def __init__(self, serial, main):
        WidgetUI.__init__(self, main, 'serialchooser.ui')

        self.serial = serial
        self.pushButton_refresh.clicked.connect(self.getPorts)
        self.pushButton_connect.clicked.connect(self.serialConnect)
        self.comboBox_port.currentIndexChanged.connect(self.selectPort)
        self.pushButton_send.clicked.connect(self.sendLine)
        self.lineEdit_cmd.returnPressed.connect(self.sendLine)

        self.getPorts()

        self.ports = []
        self.update()
    def __init__(self, main=None):
        WidgetUI.__init__(self, main, 'tmc4671_ui.ui')
        self.main = main  #type: main.MainUi
        self.timer = QTimer(self)
        self.timer_status = QTimer(self)

        self.pushButton_align.clicked.connect(self.alignEnc)
        self.initUi()

        self.timer.timeout.connect(self.updateTimer)
        self.timer_status.timeout.connect(self.updateStatus)

        self.curveAmp = self.graphWidget_Amps.plot(pen='y')
        self.curveAmpData = [0]
Пример #9
0
    def __init__(self, main=None):
        WidgetUI.__init__(self, main, 'ffbclass.ui')

        self.timer = QTimer(self)

        self.buttonbtns.setExclusive(False)
        self.axisbtns.setExclusive(False)
        self.horizontalSlider_power.valueChanged.connect(self.power_changed)
        self.horizontalSlider_degrees.valueChanged.connect(
            lambda val: self.main.comms.serialWrite("degrees=" + str(val) +
                                                    "\n"))
        self.horizontalSlider_friction.valueChanged.connect(
            lambda val: self.main.comms.serialWrite("friction=" + str(val) +
                                                    "\n"))
        self.horizontalSlider_idle.valueChanged.connect(
            lambda val: self.main.comms.serialWrite("idlespring=" + str(val) +
                                                    "\n"))
        self.horizontalSlider_esgain.valueChanged.connect(
            lambda val: self.main.comms.serialWrite("esgain=" + str(val) + "\n"
                                                    ))
        self.horizontalSlider_fxratio.valueChanged.connect(
            self.fxratio_changed)
        self.horizontalSlider_cffilter.valueChanged.connect(
            self.cffilter_changed)

        self.checkBox_invertX.stateChanged.connect(
            lambda val: self.main.comms.serialWrite("invertx=" + (
                "0" if val == 0 else "1") + "\n"))

        self.main.save.connect(self.save)
        self.timer.timeout.connect(self.updateTimer)

        #self.comboBox_driver.currentIndexChanged.connect(self.driverChanged)
        #self.comboBox_encoder.currentIndexChanged.connect(self.encoderChanged)
        self.pushButton_submit_hw.clicked.connect(self.submitHw)

        if (self.initUi()):
            tabId = self.main.addTab(self, "FFB Wheel")
            self.main.selectTab(tabId)

        self.buttonbtns.buttonClicked.connect(self.buttonsChanged)
        self.axisbtns.buttonClicked.connect(self.axesChanged)
        self.pushButton_center.clicked.connect(
            lambda: self.main.comms.serialWrite("zeroenc\n"))
Пример #10
0
    def __init__(self, main=None):
        WidgetUI.__init__(self, main, 'ffbclass.ui')

        self.timer = QTimer(self)
        self.buttonbtns.setExclusive(False)
        self.axisbtns.setExclusive(False)

        self.horizontalSlider_cffilter.valueChanged.connect(
            self.cffilter_changed)
        self.horizontalSlider_CFq.valueChanged.connect(
            self.cffilterQ_changedSlider)
        self.doubleSpinBox_CFq.valueChanged.connect(
            lambda val: self.horizontalSlider_CFq.setValue(val * 100))

        self.horizontalSlider_spring.valueChanged.connect(
            lambda val: self.main.comms.serialWrite("spring=" + str(val) + "\n"
                                                    ))
        self.horizontalSlider_damper.valueChanged.connect(
            lambda val: self.main.comms.serialWrite("damper=" + str(val) + "\n"
                                                    ))
        self.horizontalSlider_friction.valueChanged.connect(
            lambda val: self.main.comms.serialWrite("friction=" + str(val) +
                                                    "\n"))
        self.horizontalSlider_inertia.valueChanged.connect(
            lambda val: self.main.comms.serialWrite("inertia=" + str(val) +
                                                    "\n"))

        self.timer.timeout.connect(self.updateTimer)

        if (self.initUi()):
            tabId = self.main.addTab(self, "FFB Wheel")
            self.main.selectTab(tabId)

        self.pushButton_changeAxes.clicked.connect(self.changeFFBAxesCount)
        self.checkBox_axisY.stateChanged.connect(self.axisCheckBoxClicked)
        #        self.checkBox_axisZ.stateChanged.connect(self.axisCheckBoxClicked)

        self.buttonbtns.buttonClicked.connect(self.buttonsChanged)
        self.axisbtns.buttonClicked.connect(self.axesChanged)
Пример #11
0
    def __init__(self, main=None):
        WidgetUI.__init__(self, main, 'ffbclass.ui')

        self.analogbtns.setExclusive(False)
        self.buttonbtns.setExclusive(False)

        self.horizontalSlider_power.valueChanged.connect(
            self.sliderPowerChanged)
        self.horizontalSlider_degrees.valueChanged.connect(
            self.sliderDegreesChanged)
        self.main.save.connect(self.save)

        #self.comboBox_driver.currentIndexChanged.connect(self.driverChanged)
        #self.comboBox_encoder.currentIndexChanged.connect(self.encoderChanged)
        self.pushButton_submit_hw.clicked.connect(self.submitHw)

        if (self.initUi()):
            tabId = self.main.addTab(self, "FFB Wheel")
            self.main.selectTab(tabId)

        self.analogbtns.buttonClicked.connect(self.axesChanged)
        self.buttonbtns.buttonClicked.connect(self.buttonsChanged)
        self.pushButton_center.clicked.connect(
            lambda: self.main.serialWrite("zeroenc\n"))
    def __init__(self, main=None, unique='X'):
        WidgetUI.__init__(self, main, 'tmc4671_ui.ui')
        self.main = main  #type: main.MainUi

        self.axis = unique

        self.timer = QTimer(self)
        self.timer_status = QTimer(self)

        self.pushButton_align.clicked.connect(self.alignEnc)
        self.initUi()

        self.timer.timeout.connect(self.updateTimer)
        self.timer_status.timeout.connect(self.updateStatus)

        self.curveAmp = self.graphWidget_Amps.plot(pen='y')
        self.curveAmpData = [0]

        self.checkBox_advancedpid.stateChanged.connect(self.advancedPidChanged)
        self.lastPrecP = self.checkBox_P_Precision.isChecked()
        self.lastPrecI = self.checkBox_I_Precision.isChecked()
        self.buttonGroup_precision.buttonToggled.connect(self.changePrecision)

        self.comboBox_mtype.currentIndexChanged.connect(self.motorselChanged)
Пример #13
0
    def __init__(self, main=None):
        WidgetUI.__init__(self, main, 'pwmdriver_ui.ui')
        self.main = main  #type: main.MainUi

        self.initUi()
        self.pushButton_apply.clicked.connect(self.apply)
    def __init__(self, main=None, unique=1):
        WidgetUI.__init__(self, main,'tmcdebug.ui')
        self.main = main #type: main.MainUi

        self.initUi()