mirror of
https://github.com/brmlab/edubrm.git
synced 2025-08-04 07:43:35 +02:00
initialize variables on device init
This commit is contained in:
parent
b5b2a30188
commit
738cfdfc15
2 changed files with 12 additions and 10 deletions
|
@ -31,6 +31,17 @@ class Device:
|
|||
usb.util.endpoint_direction(e.bEndpointAddress) == usb.util.ENDPOINT_IN)
|
||||
else:
|
||||
print 'device init'
|
||||
self.pwm(1, 0)
|
||||
self.pwm(2, 0)
|
||||
# self.ddswave(0) # not implemented
|
||||
self.ddsfreq(0)
|
||||
self.opamp(1, 0, 0)
|
||||
self.opamp(2, 0, 0)
|
||||
self.switches(0)
|
||||
self.setpins(0)
|
||||
self.setout(1, 0)
|
||||
self.setout(2, 0)
|
||||
self.setout(3, 0)
|
||||
|
||||
# sets pwm (which=1,2), (duty=16bit)
|
||||
def pwm(self, which, duty):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue