mirror of
https://github.com/brmlab/edubrm.git
synced 2025-06-08 04:43:59 +02:00
fix pwm bug
This commit is contained in:
parent
2ce865c4c2
commit
62e4ff33f0
2 changed files with 3 additions and 2 deletions
|
@ -35,7 +35,8 @@ class Device:
|
|||
if self.fake:
|
||||
print 'pwm', which, duty
|
||||
else:
|
||||
duty = 65535 - duty
|
||||
if duty != 0:
|
||||
duty = 65536 - duty
|
||||
self.epo.write('p' + chr(which) + chr(duty & 0xff) + chr(duty >> 8))
|
||||
|
||||
# sets ddswave (wave=square,sine,saw1,saw2)
|
||||
|
|
|
@ -29,7 +29,7 @@ class ModuleDebugWidget(QWidget):
|
|||
# real device:
|
||||
self.dev = Device()
|
||||
# fake device:
|
||||
# self.dev = Device(True)
|
||||
# self.dev = Device(True)
|
||||
|
||||
self.timer = QTimer()
|
||||
QObject.connect(self.timer, SIGNAL("timeout()"), self.read_inputs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue