Still trying to figure this out.
authorRayan Hirech <ramine411@gmail.com>
Sat, 4 Feb 2017 19:57:36 +0000 (11:57 -0800)
committerRayan Hirech <ramine411@gmail.com>
Tue, 7 Feb 2017 03:45:45 +0000 (19:45 -0800)
src/org/usfirst/frc/team3501/robot/CameraFeeds.java
src/org/usfirst/frc/team3501/robot/RobotMap.java [new file with mode: 0644]
src/org/usfirst/frc/team3501/robot/commands/ExampleCommand.java [new file with mode: 0644]
src/org/usfirst/frc/team3501/robot/subsystems/ExampleSubsystem.java [new file with mode: 0644]

index 34ecb42661f5a49dda7d11d91b38c1cc7295f415..b5e6feb7e04c14a96d8753ce12508686111e7459 100755 (executable)
@@ -2,14 +2,18 @@ package org.usfirst.frc.team3501.robot;
 
 import com.ni.vision.NIVision;
 import com.ni.vision.NIVision.Image;
+
+import edu.wpi.cscore.AxisCamera;
+import edu.wpi.cscore.UsbCamera;
 import edu.wpi.first.wpilibj.CameraServer;
 
 public class CameraFeeds {
   private final int intakeCam;
   private final int climberCam;
   private int curCam;
-  private Image frame;
   private CameraServer server;
+  // private static UsbCamera intakeCam;
+  // private static AxisCamera climberCam;
 
   @SuppressWarnings("deprecation")
   public CameraFeeds() {
@@ -25,6 +29,10 @@ public class CameraFeeds {
     // Server that we'll give the img to
     server = CameraServer.getInstance();
     server.setSize(Constants.CameraFeeds.imgQuality);
+
+    // server = CameraServer.getInstance();
+    // axisCamera = cameraServer2.addAxisCamera("axisCamera", "10.35.1.11");
+    // cameraFeeds = new CameraFeeds();
   }
 
   public void init() {
@@ -67,6 +75,6 @@ public class CameraFeeds {
    */
   public void updateCam() {
     NIVision.IMAQdxGrab(curCam, frame, 1);
-    server.setImage(frame);
+    server.setSize(frame);
   }
 }
diff --git a/src/org/usfirst/frc/team3501/robot/RobotMap.java b/src/org/usfirst/frc/team3501/robot/RobotMap.java
new file mode 100644 (file)
index 0000000..d62a2f7
--- /dev/null
@@ -0,0 +1,19 @@
+package org.usfirst.frc.team3501.robot;
+
+/**
+ * The RobotMap is a mapping from the ports sensors and actuators are wired into
+ * to a variable name. This provides flexibility changing wiring, makes checking
+ * the wiring easier and significantly reduces the number of magic numbers
+ * floating around.
+ */
+public class RobotMap {
+       // For example to map the left and right motors, you could define the
+       // following variables to use with your drivetrain subsystem.
+       // public static int leftMotor = 1;
+       // public static int rightMotor = 2;
+
+       // If you are using multiple modules, make sure to define both the port
+       // number and the module. For example you with a rangefinder:
+       // public static int rangefinderPort = 1;
+       // public static int rangefinderModule = 1;
+}
diff --git a/src/org/usfirst/frc/team3501/robot/commands/ExampleCommand.java b/src/org/usfirst/frc/team3501/robot/commands/ExampleCommand.java
new file mode 100644 (file)
index 0000000..6fdb978
--- /dev/null
@@ -0,0 +1,42 @@
+package org.usfirst.frc.team3501.robot.commands;
+
+import edu.wpi.first.wpilibj.command.Command;
+
+import org.usfirst.frc.team3501.robot.Robot;
+
+/**
+ *
+ */
+public class ExampleCommand extends Command {
+       public ExampleCommand() {
+               // Use requires() here to declare subsystem dependencies
+               requires(Robot.exampleSubsystem);
+       }
+
+       // Called just before this Command runs the first time
+       @Override
+       protected void initialize() {
+       }
+
+       // Called repeatedly when this Command is scheduled to run
+       @Override
+       protected void execute() {
+       }
+
+       // Make this return true when this Command no longer needs to run execute()
+       @Override
+       protected boolean isFinished() {
+               return false;
+       }
+
+       // Called once after isFinished returns true
+       @Override
+       protected void end() {
+       }
+
+       // Called when another command which requires one or more of the same
+       // subsystems is scheduled to run
+       @Override
+       protected void interrupted() {
+       }
+}
diff --git a/src/org/usfirst/frc/team3501/robot/subsystems/ExampleSubsystem.java b/src/org/usfirst/frc/team3501/robot/subsystems/ExampleSubsystem.java
new file mode 100644 (file)
index 0000000..80516bb
--- /dev/null
@@ -0,0 +1,16 @@
+package org.usfirst.frc.team3501.robot.subsystems;
+
+import edu.wpi.first.wpilibj.command.Subsystem;
+
+/**
+ *
+ */
+public class ExampleSubsystem extends Subsystem {
+       // Put methods for controlling this subsystem
+       // here. Call these from Commands.
+
+       public void initDefaultCommand() {
+               // Set the default command for a subsystem here.
+               // setDefaultCommand(new MySpecialCommand());
+       }
+}