mirror of
https://github.com/brmlab/edubrm.git
synced 2025-06-08 12:53:59 +02:00
add handlers for AMPs/PWMs
This commit is contained in:
parent
c1ecb7d67f
commit
75704ff29f
2 changed files with 71 additions and 10 deletions
|
@ -1,7 +1,7 @@
|
|||
from PyQt4.QtGui import QWidget
|
||||
from PyQt4.QtCore import pyqtSlot
|
||||
from PyQt4.QtCore import QObject
|
||||
from ModuleDebugUi import Ui_ModuleDebug
|
||||
#from device import Device
|
||||
|
||||
class ModuleDebugWidget(QWidget):
|
||||
|
||||
|
@ -9,6 +9,67 @@ class ModuleDebugWidget(QWidget):
|
|||
QWidget.__init__(self)
|
||||
self.ui = Ui_ModuleDebug()
|
||||
self.ui.setupUi(self)
|
||||
# self.dev = Device()
|
||||
|
||||
@pyqtSlot(int)
|
||||
def on_dialPWM1_valueChanged(self, val):
|
||||
# self.dev.pwm(1, val)
|
||||
print 'pwm1:', val
|
||||
|
||||
@pyqtSlot(int)
|
||||
def on_dialPWM2_valueChanged(self, val):
|
||||
# self.dev.pwm(2, val)
|
||||
print 'pwm2:', val
|
||||
|
||||
@pyqtSlot(int)
|
||||
def on_dialAMP1_valueChanged(self, val):
|
||||
# self.dev.opamp(1, val)
|
||||
print 'amp1:', val
|
||||
|
||||
@pyqtSlot(int)
|
||||
def on_dialAMP2_valueChanged(self, val):
|
||||
# self.dev.opamp(2, val)
|
||||
print 'amp2:', val
|
||||
|
||||
@pyqtSlot(int)
|
||||
def on_checkOut0_stateChanged(self, state):
|
||||
# state and self.dev.setout(1<<0) or self.dev.clrout(1<<0)
|
||||
print 'out0:', state and '1' or '0'
|
||||
|
||||
@pyqtSlot(int)
|
||||
def on_checkOut1_stateChanged(self, state):
|
||||
# state and self.dev.setout(1<<1) or self.dev.clrout(1<<1)
|
||||
print 'out1:', state and '1' or '0'
|
||||
|
||||
@pyqtSlot(int)
|
||||
def on_checkOut2_stateChanged(self, state):
|
||||
# state and self.dev.setout(1<<2) or self.dev.clrout(1<<2)
|
||||
print 'out2:', state and '1' or '0'
|
||||
|
||||
@pyqtSlot(int)
|
||||
def on_checkOut3_stateChanged(self, state):
|
||||
# state and self.dev.setout(1<<3) or self.dev.clrout(1<<3)
|
||||
print 'out3:', state and '1' or '0'
|
||||
|
||||
@pyqtSlot(int)
|
||||
def on_checkOut4_stateChanged(self, state):
|
||||
# state and self.dev.setout(1<<4) or self.dev.clrout(1<<4)
|
||||
print 'out4:', state and '1' or '0'
|
||||
|
||||
@pyqtSlot(int)
|
||||
def on_checkOut5_stateChanged(self, state):
|
||||
# state and self.dev.setout(1<<5) or self.dev.clrout(1<<5)
|
||||
print 'out5:', state and '1' or '0'
|
||||
|
||||
@pyqtSlot(int)
|
||||
def on_checkOut6_stateChanged(self, state):
|
||||
# state and self.dev.setout(1<<6) or self.dev.clrout(1<<6)
|
||||
print 'out6:', state and '1' or '0'
|
||||
|
||||
@pyqtSlot(int)
|
||||
def on_checkOut7_stateChanged(self, state):
|
||||
# state and self.dev.setout(1<<7) or self.dev.clrout(1<<7)
|
||||
print 'out7:', state and '1' or '0'
|
||||
|
||||
class ModuleDebug():
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@
|
|||
<property name="title">
|
||||
<string>Outputs</string>
|
||||
</property>
|
||||
<widget class="QCheckBox" name="checkOut8">
|
||||
<widget class="QCheckBox" name="checkOut7">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
|
@ -343,7 +343,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkOut7">
|
||||
<widget class="QCheckBox" name="checkOut6">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>30</x>
|
||||
|
@ -356,7 +356,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkOut6">
|
||||
<widget class="QCheckBox" name="checkOut5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>50</x>
|
||||
|
@ -369,7 +369,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkOut5">
|
||||
<widget class="QCheckBox" name="checkOut4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>70</x>
|
||||
|
@ -382,7 +382,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkOut4">
|
||||
<widget class="QCheckBox" name="checkOut3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>90</x>
|
||||
|
@ -395,7 +395,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkOut3">
|
||||
<widget class="QCheckBox" name="checkOut2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>110</x>
|
||||
|
@ -408,7 +408,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkOut2">
|
||||
<widget class="QCheckBox" name="checkOut1">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>130</x>
|
||||
|
@ -421,7 +421,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="checkOut1">
|
||||
<widget class="QCheckBox" name="checkOut0">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>150</x>
|
||||
|
@ -445,7 +445,7 @@
|
|||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string> 8 7 6 5 4 3 2 1</string>
|
||||
<string> 7 6 5 4 3 2 1 0</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue