/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package com.grt192.deploy;
import com.grt192.actuator.GRTTwoWaySolenoid;
import com.grt192.controller.DashBoardController;
import com.grt192.controller.cannonbot.CBCannonController;
import com.grt192.controller.cannonbot.CBDriveController;
import com.grt192.controller.cannonbot.TargetController;
import com.grt192.core.GRTRobot;
import com.grt192.mechanism.GRTCompressor;
import com.grt192.mechanism.GRTDriverStation;
import com.grt192.mechanism.cannonbot.CBArm;
import com.grt192.mechanism.cannonbot.CBCannon;
import com.grt192.mechanism.cannonbot.CBTankDriveTrain;
import com.grt192.mechanism.cannonbot.Target;
/**
* The VM is configured to automatically run this class, and to call the
* functions corresponding to each mode, as described in the SimpleRobot
* documentation. If you change the name of this class or the package after
* creating this project, you must also update the manifest file in the resource
* directory.
*/
public class CannonBot extends GRTRobot {
// Mechanisms
private CBTankDriveTrain driveTrain;
private CBCannon cannon;
private GRTCompressor compressor;
private CBArm arm;
private GRTDriverStation driverStation;
private Target target;
// Teleop Controllers
private CBDriveController driveController;
private CBCannonController cannonController;
private TargetController targetController;
// Autonomous Controllers
// Global Controllers
private DashBoardController dashboardController;
public CannonBot() {
driveTrain = new CBTankDriveTrain(2,4, 2);
driverStation = new GRTDriverStation(1, 2, 3);
compressor = new GRTCompressor(1, 1);
cannon = new CBCannon(1, 2, 3, 4, compressor);
arm = new CBArm(5, 6, compressor);
target = new Target(new GRTTwoWaySolenoid(1,2));
cannonController = new CBCannonController(driverStation, cannon);
driveController = new CBDriveController (driveTrain, driverStation);
dashboardController = new DashBoardController();
dashboardController.start();
targetController = new TargetController(driverStation, target);
targetController.start();
this.teleopControllers.addElement(cannonController);
this.teleopControllers.addElement(targetController);
}
}