Beta8397 / virtual_robot

A 2D robot simulator to help beginners learn Java programming for FTC Robotics
100 stars 171 forks source link

Changes so that hardware cannot be accessed until after INIT is pressed #36

Closed jkenney2 closed 3 years ago

jkenney2 commented 3 years ago

For greater adherence to behavior of the FTC control system, it should not be possible to obtain references to hardware before the INIT button is pressed (so, calls to hardwareMap.get, hardwareMap.dcMotor.get, etc, should not work).

With this change, attempts to obtain hardware references will result in an error message, and return of a null object. This ultimately will result in an exception, and the op mode will exit.