forked from M-Labs/artiq
1
0
Fork 0

examples/transport: pep8

This commit is contained in:
Sebastien Bourdeauducq 2014-10-19 13:09:10 +08:00
parent caab81974a
commit c5acb68258
1 changed files with 14 additions and 13 deletions

View File

@ -32,8 +32,10 @@ class Transport(AutoContext):
# also mark the frame as closed and prevent further append()ing # also mark the frame as closed and prevent further append()ing
self.tf.close() self.tf.close()
# user must pass all frames that are going to be used next # user must pass all frames that are going to be used next
# selects possible frame id based on rtio_frame assignments from coredev # selects possible frame id based on rtio_frame assignments
# distributes frames to the sub-devices in CompoundPDQ2 and uploads them # from core device
# distributes frames to the sub-devices in CompoundPDQ2
# and uploads them
# uploading is ARM_DIS, writing, ARM_EN # uploading is ARM_DIS, writing, ARM_EN
self.electrodes.prepare(self.tf) self.electrodes.prepare(self.tf)
@ -49,9 +51,7 @@ class Transport(AutoContext):
# ensures no frame is currently being actively played # ensures no frame is currently being actively played
# set rtio frame select signal to frame id # set rtio frame select signal to frame id
# rtio trigger jump into transport frame # rtio trigger jump into transport frame
# (it would be nice if this could be made zero-duration/not advancing the # (does not advance the timeline)
# timeline by smart scheduling of this frame-select + trigger + minimum wait
# sequence)
self.tf.begin() self.tf.begin()
# triggers pdqs to start transport frame segment # triggers pdqs to start transport frame segment
# plays the transport waveform from 0 to stop # plays the transport waveform from 0 to stop
@ -125,7 +125,8 @@ if __name__ == "__main__":
pmt=rtio_core.RTIOIn(core=coredev, channel=0), pmt=rtio_core.RTIOIn(core=coredev, channel=0),
# a compound pdq device that wraps multiple usb devices (looked up # a compound pdq device that wraps multiple usb devices (looked up
# by usb "serial number"/id) into one # by usb "serial number"/id) into one
electrodes=pdq2.CompoundPDQ2(core=coredev, electrodes=pdq2.CompoundPDQ2(
core=coredev,
ids=["qc_q1_{}".format(i) for i in range(4)], ids=["qc_q1_{}".format(i) for i in range(4)],
rtio_trigger=3, rtio_frame=(4, 5, 6)), rtio_trigger=3, rtio_frame=(4, 5, 6)),
transport_data=data, # or: json.load transport_data=data, # or: json.load