Go to Post I'd be upset if someone threw away my robotics shirts. Because then I'd have no shirts. - evulish [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 12-01-2015, 00:14
stepan's Avatar
stepan stepan is offline
Programming Captain
AKA: Stepan Subbotin
FRC #4536 (MinuteBots)
Team Role: Programmer
 
Join Date: Dec 2014
Rookie Year: 2012
Location: St. Paul, MN
Posts: 13
stepan is an unknown quantity at this point
Which Base Class Are You Using?

I'm curious about what Java base class other teams are using. During the fall, while re-programming the robot in Java, we used the SimpleRobot base class (now called SampleRobot). I've seen some people post code that uses the IterativeClass.

The main difference is that the IterativeClass automatically loops the autonomous and teleop methods. In the the SampleRobot class the autonomous and teleop methods are only called once, so you have to loop them yourself using a while loop and the timer class.

SampleRobot base class:

Code:
public void autonomous() {    
        while (isAutonomous() && isEnable()) {
            //Put code here
            Timer.delay(0.05);
        }
}
IterativeRobot base class:

Code:
public void autonomousPeriodic() {
        //Put code here
}
I believe a lot teams also use command-based programming.

Anyways, what do you use and why do you use it?
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:15.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi