Go to Post We score 8 out of 10 every match. Oh wait, that's just what it does in theory. ;) Man, I wish that theory worked. - Chriszuma [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
  #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
 


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 08:26 AM.

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