diff --git a/labscript_devices/FunctionRunner/labscript_devices.py b/labscript_devices/FunctionRunner/labscript_devices.py index 5f5b04a7..804fd937 100644 --- a/labscript_devices/FunctionRunner/labscript_devices.py +++ b/labscript_devices/FunctionRunner/labscript_devices.py @@ -90,7 +90,7 @@ def func(shot_context, t, ...): def generate_code(self, hdf5_file): # Python's sorting is stable, so items with equal times will remain in the order # they were added - self.functions.sort() + self.functions.sort(key=lambda item: item[0]) vlenstr = h5py.special_dtype(vlen=str) table_dtypes = [ ('t', float),