Commit 466e01ca authored by Marco Buttu's avatar Marco Buttu
Browse files

Go back to the original position before closing

parent be15d7f6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -123,9 +123,9 @@ current_time = datetime.datetime.now()
out_file_name = current_time.strftime('pfpfocus_%Y_%m_%d_h%H_%M.txt')
abs_outfile_name = os.path.join(dirname, out_file_name)
with open(abs_outfile_name, 'w') as outfile:
    outfile.write('%s POSITION  TPIA_CH0  TPIA_CH1  TPIB_CH0 TPIB_CH1'
    outfile.write('# %s POS  TPIA_CH0  TPIA_CH1  TPIB_CH0  TPIB_CH1'
                   % args.axis)
    position = current_pos
    position = current_pos[:]
    for point in points:
        position[address] = point
        print("Going to position (%s)" % fmt_position(position))