View Single Post
  #7   Spotlight this post!  
Unread 01-25-2016, 08:39 PM
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 232
TimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura about
Re: Extremely Broken Code Please Help!

Quote:
Originally Posted by twiggzee View Post
I'm having the same problem. Compiles just fine but red light on driver station robot code.

When I comment out everything in public OI{}, I get green light on driver station robot code. But why??

TimTheGreat: What do you mean by "Try putting OI after everything"?

Thanks for your reply!
So in LFRobotics' code he has

Code:
        oi = new OI();
        pnue = new Pnuematics();
The problem is when you create a new OI object, it looks for robot.pneu. But as you can see pneu hasn't been created because it is after new OI(). So put new OI below the creation of everything else (in this case swap them).
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
Reply With Quote