Team2168 / 2015_Main_Robot

Source code for the 2015 season
2 stars 0 forks source link

OI should be a singleton class #59

Closed NotInControl closed 9 years ago

NotInControl commented 9 years ago

If we every want to log joysticks or commands on the smartdashboard, then the consol printer task should start after OI is created.

Essentially move the two console printer lines below the 'new OI()' line in this function below:

https://github.com/Team2168/2015_Main_Robot/blob/master/src/org/team2168/Robot.java#L69-L70

Update:

A better long term solution is to make OI a singleton class as suggested by James, so please make OI a singleton, similar to all of the Subsystem classes.

jcorcoran commented 9 years ago

Unless you disagree, I think the better long term solution would be to make OI a singleton, so you can't call it wrong.

To do this, make the constructor private, add a getInstance method that is public. Similar to the subsystems.

NotInControl commented 9 years ago

I agree with your approach as a better long term solution, so that's the way we should move forward, with OI as a singleton.

jcorcoran commented 9 years ago

closed by #65