TeamCode/src/main/java/org/firstinspires/ftc/teamcode/examples/StateExample.java
@Override
    public void loop() {
        // Check if the state machine has finished
        if (currState.nextState() == null) return;

        if (currState.nextState() != currState) {
            currState = currState.nextState();
            currState.init();
        }

        currState.perform();
        telemetry.addData("STATE", currState.toString());
    }
/**
     * User defined loop method
     * <p>
     * This method will be called repeatedly in a loop while this op mode is running
     */
User defined loop method

This method will be called repeatedly in a loop while this op mode is running
User defined loop method This method will be called repeatedly in a loop while this op mode is running
@Override
    public void loop() {
        if (currState.nextState() == null) return;
        if (currState.nextState() != currState) {
            currState = currState.nextState();
            currState.init();
        }
        currState.perform();
        telemetry.addData("STATE", currState.toString());
    }
@ Override public void loop ( ) { if ( currState . nextState ( ) == null ) return ; if ( currState . nextState ( ) != currState ) { currState = currState . nextState ( ) ; currState . init ( ) ; } currState . perform ( ) ; telemetry . addData ( "STATE" , currState . toString ( ) ) ; }
User defined loop method
 <p>
 This method will be called repeatedly in a loop while this op mode is running
User defined loop method <p > This method will be called repeatedly in a loop while this op mode is running
// Check if the state machine has finished