Last active
November 2, 2015 04:06
-
-
Save floogulinc/28dc0ad3fc4dc1afb78b to your computer and use it in GitHub Desktop.
Simple robot driving module for Toast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package frc.team2879.drivemodule; | |
import edu.wpi.first.wpilibj.Joystick; | |
import edu.wpi.first.wpilibj.RobotDrive; | |
import edu.wpi.first.wpilibj.Talon; | |
import jaci.openrio.toast.lib.log.Logger; | |
import jaci.openrio.toast.lib.module.IterativeModule; | |
public class RobotModule extends IterativeModule { | |
public static Logger logger; | |
public static RobotDrive robotDrive; | |
public static Joystick driveJoystick = new Joystick(0); | |
@Override | |
public String getModuleName() { | |
return "DriveModule"; | |
} | |
@Override | |
public String getModuleVersion() { | |
return "0.0.1"; | |
} | |
@Override | |
public void robotInit() { | |
logger = new Logger("DriveModule", Logger.ATTR_DEFAULT); | |
logger.info("Hello World"); | |
robotDrive = new RobotDrive(0, 1); | |
robotDrive.setSafetyEnabled(false); | |
} | |
public void teleopPeriodic() { | |
robotDrive.arcadeDrive(driveJoystick, false); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment