summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-03-23 19:28:44 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-03-23 19:28:44 -0400
commita9cac343eff6edbb265a4e14cee38aa1606ae02c (patch)
tree279efdadf4b9ec4f0a0db0f66ab26684d173abe8 /src
parentcf81273978ce1814f260744879e23382186aa1f7 (diff)
add PDP monitoring
Diffstat (limited to 'src')
-rw-r--r--src/org/usfirst/frc/team4272/robot2016/HwRobot.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/org/usfirst/frc/team4272/robot2016/HwRobot.java b/src/org/usfirst/frc/team4272/robot2016/HwRobot.java
index f120ee0..3306486 100644
--- a/src/org/usfirst/frc/team4272/robot2016/HwRobot.java
+++ b/src/org/usfirst/frc/team4272/robot2016/HwRobot.java
@@ -1,14 +1,17 @@
package org.usfirst.frc.team4272.robot2016;
-import org.usfirst.frc.team4272.robotlib.PIDOutputSplitter;
+import edu.wpi.first.wpilibj.networktables.NetworkTable;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.Encoder;
import edu.wpi.first.wpilibj.PIDOutput;
import edu.wpi.first.wpilibj.PIDSourceType;
+import edu.wpi.first.wpilibj.PowerDistributionPanel;
import edu.wpi.first.wpilibj.Talon;
+import org.usfirst.frc.team4272.robotlib.PIDOutputSplitter;
+
public class HwRobot {
/* Relay == a Spike */
/* PCM = Pneumatics Control Module */
@@ -40,11 +43,13 @@ public class HwRobot {
public final DigitalInput ballL = new DigitalInput(/*DIO*/4);
public final Encoder rDriveE = new Encoder(/*DIO*/5,/*DIO*/6);
public final Encoder lDriveE = new Encoder(/*DIO*/7,/*DIO*/8, true);
+ public final PowerDistributionPanel PDP = new PowerDistributionPanel(); /* via CAN */
public HwRobot() {
armE.setPIDSourceType(PIDSourceType.kDisplacement);
lDriveE.setPIDSourceType(PIDSourceType.kRate);
rDriveE.setPIDSourceType(PIDSourceType.kRate);
+ PDP.initTable(NetworkTable.getTable("PDP"));
}
public void run(Control c) {
@@ -67,5 +72,8 @@ public class HwRobot {
SmartDashboard.putNumber("rDriveE rate", rDriveE.getRate());
SmartDashboard.putBoolean("ballL", ballL.get());
SmartDashboard.putBoolean("armL", armL.get());
+
+ PDP.updateTable();
+ SmartDashboard.putData("PDP", PDP);
}
}