View Single Post
  #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