Where did handleLoop in LinearOpMode go?


there is reference to handleLoop() which is a useful (if not perfect) way to do some things in LinearOpMode that you can do in regular OpMode during init_loop().
protected void handleLoop()

We have been using that in the version 8.0 and previous SDKs, but in 8.1.1 it seems gone.

it was “protected”, so that should be a method that is acceptable to override in a subclass.

Overriding waitForStart() and adding some processing in the loop would be another way to do some processing while waiting for start (i.e. during init_loop()), but even though waitForStart is public and not final, it is difficult to override because it references runningNotifier which is private final and used by other (final) methods in LinearOpMode to coordinate threads.

Management summary: in 8.1.1 is there a way to “hook” into the init_loop allowing some processing to happen during waitForStart()?

I believe in SDK 7.2 the opModeInInit() function was introduced that allows a Linear OpMode to know whether the Driver Station is still within the init phase (and not in start or stop phase). There’s no “requirement” to actually sit idle in waitForStart() at any point during your OpMode - Linear OpModes can do work while waiting for the start phase to begin (you should always call waitForStart() prior to the beginning of your start code regardless, however).

Calling opModeInInit() is the recommended method of determining if the Driver Station has transitioned away from the init mode while performing processing prior to calling waitForStart().

By the way, the official JavaDoc can be found here:


Ok. I guess I see how that could work. Thanks!