def _updateGUI(self) :
        BaseGraphicScan._updateGUI(self)
        aTable = self._widgetTree.child('__table')
        (startMot1,v1),(stopMot1,v2) = [aTable.text(0,column).toFloat() for column in range(1,3)]
        if not v1 or not v2 : return
        
        (startMot2,v1),(stopMot2,v2) = [aTable.text(1,column).toFloat() for column in range(1,3)]
        if not v1 or not v2 : return

        try:
            angle = math.atan((stopMot2 - startMot2) / (stopMot1 - startMot1))
        except ZeroDivisionError:
            angle = math.pi / 2
        aTable.setText(2,0,'%.2f' % (angle * 180 / math.pi))

        self._valueChangedScanParam(2,3)
Example #2
0
    def _updateGUI(self):
        BaseGraphicScan._updateGUI(self)
        aTable = self._widgetTree.child('__table')
        (startMot1, v1), (stopMot1, v2) = [
            aTable.text(0, column).toFloat() for column in range(1, 3)
        ]
        if not v1 or not v2: return

        (startMot2, v1), (stopMot2, v2) = [
            aTable.text(1, column).toFloat() for column in range(1, 3)
        ]
        if not v1 or not v2: return

        try:
            angle = math.atan((stopMot2 - startMot2) / (stopMot1 - startMot1))
        except ZeroDivisionError:
            angle = math.pi / 2
        aTable.setText(2, 0, '%.2f' % (angle * 180 / math.pi))

        self._valueChangedScanParam(2, 3)