summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/org/usfirst/frc/team4272/robot2017/HwRobot.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/org/usfirst/frc/team4272/robot2017/HwRobot.java b/src/org/usfirst/frc/team4272/robot2017/HwRobot.java
index 8dbfd51..091b68b 100644
--- a/src/org/usfirst/frc/team4272/robot2017/HwRobot.java
+++ b/src/org/usfirst/frc/team4272/robot2017/HwRobot.java
@@ -31,6 +31,7 @@ package org.usfirst.frc.team4272.robot2017;
import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.DoubleSolenoid;
+import edu.wpi.first.wpilibj.DriverStation;
import edu.wpi.first.wpilibj.Encoder;
import edu.wpi.first.wpilibj.PIDOutput;
import edu.wpi.first.wpilibj.PIDSourceType;
@@ -71,13 +72,15 @@ public class HwRobot {
public final Encoder lDriveE = new Encoder(/*DIO*/0,/*DIO*/1, /*reverse*/false);
public final Encoder rDriveE = new Encoder(/*DIO*/2,/*DIO*/3, /*reverse*/true);
public final PowerDistributionPanel PDP = new PowerDistributionPanel(); /* via CAN */
-
- private double maxRate = 0;
+ public final DriverStation ds = DriverStation.getInstance();
public DoubleSolenoid
shifter = new DoubleSolenoid(/*PCM*/4, /*PCM*/5),
ged = new DoubleSolenoid(/*PCM*/6, /*PCM*/7);
+ private double maxRate = 0;
+ private double minBatt = 20;
+
public HwRobot() {
lDriveE.setDistancePerPulse(10.0/*feet*/ / 1865.75/*pulses*/);
rDriveE.setDistancePerPulse(10.0/*feet*/ / 1865.75/*pulses*/);
@@ -107,6 +110,12 @@ public class HwRobot {
maxRate = rate;
SmartDashboard.putNumber("maxRate", maxRate);
+ double batt = ds.getBatteryVoltage();
+ SmartDashboard.putNumber("batt", batt);
+ if (batt < minBatt)
+ minBatt = batt;
+ SmartDashboard.putNumber("minBatt", minBatt);
+
SmartDashboard.putBoolean("highGear", c.highGear);
SmartDashboard.putBoolean("gedOut", c.gedOut);