View Single Post
  #3   Spotlight this post!  
Unread 01-28-2016, 10:48 PM
Snapperbot Snapperbot is offline
Registered User
FRC #4501 (Humans)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2012
Location: Santa Monica
Posts: 6
Snapperbot is an unknown quantity at this point
Re: Updating Joysticks in a Command

Here's the GitHub page.
The code I'm talking about would be in these classes:
  • Robot
  • OI
  • subsystems/Shooter
  • commands/ShooterArcade
  • commands/ShooterIdle.
Here's a part of the ShooterArcade class:
Code:
public class ShooterArcade extends Command {
	OI oi;
	Shooter shooter;
    public ShooterArcade() {
    	requires(Robot.shooter);
    	shooter = Robot.shooter;
    	oi = Robot.oi;
    }

    // Called just before this Command runs the first time
    protected void initialize() {
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
    	double shooterSpeed = oi.getShooterThrottle();
    	
    	shooter.shooterArcade(shooterSpeed);
    }

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
        return true;
    }
If you need more info feel free to ask.
Reply With Quote