The original program realizes state machine transition through on-board switches. In order not to use on-board switches, I made corresponding modifications in the program, as follows:

After the above settings, the program successfully jumps to the next state, that is stateCalib(),then , the program enters stateAlign( ).
But the problem occurred. In this program, GDU errors were found, as shown in the figure:

I want to know why and how to avoid
Best regards