Go to Post If a suspicious distrustful atmosphere is created, then a suspicious distrustful reaction will occur. - JaneYoung [more]
Home
Go Back   Chief Delphi > Technical > Programming
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
  #10   Spotlight this post!  
Unread 27-03-2012, 00:07
Gigakaiser Gigakaiser is offline
Registered User
AKA: Brandon Hjelstrom
FRC #0987 (High Rollers)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Las Vegas
Posts: 67
Gigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant futureGigakaiser has a brilliant future
Re: How does your team architect its codebase?

-Each subsystem on our robot (turret, drivetrain, ramp device, etc) is an object/class in our code. Each has an "operator_update" function called in teleop where inputs on the joysticks are given - this allows for all calculations and commands to be handled in each class.

Piece of Main Teleop Loop:
Code:
     Launcher->UpdateLaunch_Operator(turretStick->GetTrigger(),turretStick->GetRawButton(6));
-An autonomous object is used in our code as well. Inside of the class, the routines are comprised of single-line commands such as "LaunchBall", "GyroTurn(angle)", and "SetWheelState(state)".

-An autonomous routine would look like this:
Code:
void AutoController::AUTO_Layup()
{
     Shooter->SetState(state_RPM)
     SetShooter(1550);
     Drive_GyroEnc(.6f,0.0f,450);
     SetTurret(-45.0f);
     IntakeOn();
     FullLaunch();
     WaitForBall();
     FullLaunch();
}
In the main Autonomous Loop:
Code:
if(DIP_1 == 1)
{
     AutonController->AUTO_Layup();
}
else.....
-Functions on the robot are all condensed to one-button commands (like the 254 auto-score).

-We use bitbucket for source control.
__________________
FRC Team 987 - It's not enough
 


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 05:45.

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