Skip to content

Commit e4e2e9a

Browse files
committed
Prevent windfreak from programming a channel if it doesn't need to.
1 parent f19f5f4 commit e4e2e9a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

labscript_devices/Windfreak/blacs_workers.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,12 @@ def transition_to_buffered(self, device_name, h5file, initial_values, fresh):
131131

132132
for i in channels:
133133
for sub in self.subchnls:
134-
self.program_static_value(i,sub,data[sub+str(i)])
135-
# update smart cache to reflect programmed values
136-
self.smart_cache['STATIC_DATA'][f'channel {i:d}'][sub] = data[sub+str(i)]
137-
# update final values to reflect programmed values
138-
self.final_values[f'channel {i:d}'][sub] = data[sub+str(i)]
134+
if initial_values[f'channel {i:d}'][sub] != data[sub+str(i)]:
135+
self.program_static_value(i,sub,data[sub+str(i)])
136+
# update smart cache to reflect programmed values
137+
self.smart_cache['STATIC_DATA'][f'channel {i:d}'][sub] = data[sub+str(i)]
138+
# update final values to reflect programmed values
139+
self.final_values[f'channel {i:d}'][sub] = data[sub+str(i)]
139140

140141
return self.final_values
141142

0 commit comments

Comments
 (0)