Switch between two codes

Yes, both codes have delay, especially the autonomous mode