本文整理汇总了Java中edu.wpi.first.wpilibj.templates.commands.CommandBase.init方法的典型用法代码示例。如果您正苦于以下问题:Java CommandBase.init方法的具体用法?Java CommandBase.init怎么用?Java CommandBase.init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.wpi.first.wpilibj.templates.commands.CommandBase
的用法示例。
在下文中一共展示了CommandBase.init方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: robotInit
import edu.wpi.first.wpilibj.templates.commands.CommandBase; //导入方法依赖的package包/类
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit() {
// instantiate the command used for the autonomous period
autonomousCommand = new ExampleCommand();
frontLeft = new Victor(1); // Creating Victor motors
frontRight = new Victor(2);
rearLeft = new Victor(3);
rearRight = new Victor(4);
myDrive = new RobotDrive(frontLeft, frontRight);
// myDrive = new RobotDrive(frontLeft,frontRight,rearLeft,rearRight);
driveStick = new Joystick(1);
gyro = new Gyro(1);
// Initialize all subsystems
CommandBase.init();
}
示例2: robotInit
import edu.wpi.first.wpilibj.templates.commands.CommandBase; //导入方法依赖的package包/类
public void robotInit() {
// instantiate the command used for the autonomous period
//autonomousCommand = new ExampleCommand();
// Initialize all subsystems
CommandBase.init();
table = NetworkTable.getTable("CRIO");
table.putBoolean("bool", true);
table.putNumber("double", 3.1415927);
table.putString("sring", "a string");
LogDebugger.log("robot init!!!");
// LiveWindow.addActuator("compressor", "alt relay", RobotMap.testCompRelay);
// LiveWindow.addActuator("compressor", "act compressor", RobotMap.airCompressor);
// LiveWindow.addSensor("compressor", "sensor compressor", RobotMap.airCompressor);
}
示例3: robotInit
import edu.wpi.first.wpilibj.templates.commands.CommandBase; //导入方法依赖的package包/类
/**
*
*/
public void robotInit() {
// instantiate the command used for the autonomous period
DriveTrain = new DriveTrain();
launchercontroller = new Launcher();
rollerSubsystem = new Roller();
display = DriverStationLCD.getInstance();
compressor = new Compressor(RobotMap.PressureSwitchDigitalInput, RobotMap.CompressorRelay);
compressor.start();
DriveTrain.shiftHighGear();
OI.initialize();
autonomousCommand = new Autonomous();
arduino = new ArduinoConnection();
arduino.setPattern("4");
pattern = 0;
driverStation = DriverStation.getInstance();
alliance = driverStation.getAlliance().value;
digital1 = driverStation.getDigitalIn(1);
digital2 = driverStation.getDigitalIn(2);
digital3 = driverStation.getDigitalIn(3);
// Initialize all subsystems.
// Subsystems: a self-contained system within a larger system.
CommandBase.init();
}
示例4: robotInit
import edu.wpi.first.wpilibj.templates.commands.CommandBase; //导入方法依赖的package包/类
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit() {
// instantiate the command used for the autonomous period
autonomousCommand = new ExampleCommand();
RobotParts.compressor.start();
RobotParts.drive.setSafetyEnabled(false);
// Initialize all subsystems
CommandBase.init();
}
示例5: robotInit
import edu.wpi.first.wpilibj.templates.commands.CommandBase; //导入方法依赖的package包/类
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit() {
SmartDashboard.putData("Tank Drive", new SetStation(1));
SmartDashboard.putData("Arcade Drive", new SetStation(2));
SmartDashboard.putData("XBox Controller Tank", new SetStation(3));
SmartDashboard.putData("XBox Controller Arcade", new SetStation(4));
/**
* Adds buttons to SmartDAshboard
*/
// instantiate the command used for the autonomous period
autonomousCommand = new AutonomousCommand();
prefs = Preferences.getInstance();
prefs.putDouble("Deadband",0.1);
prefs.putDouble("ArmDeadband", 0.1);
prefs.putDouble("LeftPolarity", -1);
prefs.putDouble("RightPolarity", -1);
prefs.putDouble("Scaler", 1);
prefs.putDouble("HueLow", 80);
prefs.putDouble("HueHigh", 200);
prefs.putDouble("SaturationLow",100);
prefs.putDouble("SaturationHigh",300);
prefs.putDouble("BrightnessLow",200);
prefs.putDouble("BrightnessHigh", 240);
SmartDashboard.putData(Scheduler.getInstance());
/**
* Adds variables to the Preferences Table in SmartDashboard,
*/
// Initialize all subsystems
CommandBase.init();
System.out.println("--------------------2713-----------------------");
System.out.println("*Awsome-sauce code produced by Fid inc. *");
System.out.println("*WARNING: might not possibly work *");
System.out.println("-----------------TEST-ROBOT--------------------");
}
示例6: robotInit
import edu.wpi.first.wpilibj.templates.commands.CommandBase; //导入方法依赖的package包/类
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit() {
// instantiate the command used for the autonomous period
autonomousCommand = new ExampleCommand();
// Initialize all subsystems
CommandBase.init();
}
示例7: robotInit
import edu.wpi.first.wpilibj.templates.commands.CommandBase; //导入方法依赖的package包/类
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit() {
teleopDriveCommand = new DriveWithJoystick();
// Initialize all subsystems
CommandBase.init();
}
示例8: robotInit
import edu.wpi.first.wpilibj.templates.commands.CommandBase; //导入方法依赖的package包/类
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit() {
// instantiate the command used for the autonomous period
autonomousCommand = new AutoMode();
// Initialize all subsystems
CommandBase.init();
}
示例9: robotInit
import edu.wpi.first.wpilibj.templates.commands.CommandBase; //导入方法依赖的package包/类
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit() {
// instantiate the command used for the autonomous period
//autonomousCommand = new Autonomous();
// Initialize all subsystems
CommandBase.init();
SmartDashboard.putData(Scheduler.getInstance());
delay = new Delay(1);
gyroOff = CommandBase.gyro.getAngle()/Timer.getFPGATimestamp();
}
示例10: robotInit
import edu.wpi.first.wpilibj.templates.commands.CommandBase; //导入方法依赖的package包/类
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit() {
getWatchdog().setEnabled(true);
RobotMap.init();
CommandBase.init();
drivetrain = CommandBase.drivetrain;
SmartDashboard.putBoolean("motorKilled", false);
}
示例11: robotInit
import edu.wpi.first.wpilibj.templates.commands.CommandBase; //导入方法依赖的package包/类
public void robotInit() {
autonomousCommand = new Autonomous1();
autoChooser = new SendableChooser();
autoChooser.addDefault("Autonomous 1", new Autonomous1());
SmartDashboard.putData("Autonomous Chooser", autoChooser);
CommandBase.init();
}
示例12: robotInit
import edu.wpi.first.wpilibj.templates.commands.CommandBase; //导入方法依赖的package包/类
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit() {
// instantiate the command used for the autonomous period
// autonomousCommand = new ExampleCommand();
// Initialize all subsystems
CommandBase.init();
}
示例13: robotInit
import edu.wpi.first.wpilibj.templates.commands.CommandBase; //导入方法依赖的package包/类
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit() {
// Initialize the CommandBase so that everything is ready to run
CommandBase.init();
// instantiate the command used for the autonomous period
// Set it so that it runs the SodaDelivery command automatically during
// the automous period.
autonomousCommand = new SodaDelivery();
}
示例14: robotInit
import edu.wpi.first.wpilibj.templates.commands.CommandBase; //导入方法依赖的package包/类
/**
* This function is run when the robot is first started up and should be
* used for any initialization code.
*/
public void robotInit() {
// instantiate the command used for the autonomous period
autonomousCommand = new ExampleCommand();
driveCommand = new Drive();
shootCommand = new RunShooter();
eccentricCommand = new EccentricWheel();
potCommand = new Potentiometer();
// Initialize all subsystems
CommandBase.init();
}