Comment to Metatron: test of the mirror realignment procedure based on the last positions saved while the arm was locked
The SUS.py code for the alignment of all towers has been updated in order to take into account the machinery inside the DSP cards.
So, while requesting to align (which correspond to execute the ALIGNING state):
1. The delta between the last saved good position (supposedly during the last lock just before unlocking as already explained) and the current position of the mirrors (from optical levers) is calculated
2. The new DSP setpoint is calculated by adding the delta to the current DSP setting
3. The new setpoint is applied to the DSP
In this respect it must be noted that this alignement process only happen during the execution of the ALIGNING state. (See attached schema). So if the state machine is already on the ALIGNED state and a request to go to ALIGNED is triggered (as during the NARM/WARM locking automation) nothing will truly happen and the state machine will simply remain in the ALIGNED state.
In order to have the ALIGNING sequence truly happen, the SUS_* states machine must be driven before to the DOWN state.
The saving of the last good position while locked has been also extended to NARM_LOCK