inject

open fun inject(@NonNull gamepad1: Controller, @NonNull gamepad2: Controller)

Injects two instances of Controller into the event loop manager and OpMode, causing the underlying gamepad objects to be instances of a Controller, extending Gamepad.

BunyipsOpMode automatically calls this method as part of a pre-initialisation hook.

e.g. Injecting new unmanaged Controller objects into all current and future run OpModes of this power cycle: Controller.inject(new Controller(GamepadUser.ONE), new Controller(GamepadUser.TWO);

Parameters

gamepad1

gamepad user 1 to inject

gamepad2

gamepad user 2 to inject