File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
labscript_devices/AD9959DDSSweeper Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,10 @@ def generate_code(self, hdf5_file):
237237 elif isinstance (output , StaticDDS ):
238238 stat_DDSs [channel ] = output
239239
240+ # if no channels are being used, no need to continue
241+ if not dyn_DDSs and not stat_DDSs :
242+ return
243+
240244 for connection in dyn_DDSs :
241245 dds = dyn_DDSs [connection ]
242246 dds .frequency .raw_output = self .quantise_freq (dds .frequency .raw_output , dds )
@@ -269,10 +273,6 @@ def generate_code(self, hdf5_file):
269273 static_table ['freq%d' % connection ] = sdds .frequency .raw_output [0 ]
270274 static_table ['amp%d' % connection ] = sdds .amplitude .raw_output [0 ]
271275 static_table ['phase%d' % connection ] = sdds .phase .raw_output [0 ]
272-
273- # if no channels are being used, no need to continue
274- if not dyn_DDSs and not stat_DDSs :
275- return
276276
277277 # write out data tables
278278 grp = self .init_device_group (hdf5_file )
You can’t perform that action at this time.
0 commit comments