diff --git a/software/device.py b/software/device.py index 1ab1cf5..27d4cd3 100644 --- a/software/device.py +++ b/software/device.py @@ -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) diff --git a/software/modules/ModuleDebug.py b/software/modules/ModuleDebug.py index 2942156..32bf474 100644 --- a/software/modules/ModuleDebug.py +++ b/software/modules/ModuleDebug.py @@ -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)