Commit Graph

15 Commits

Author SHA1 Message Date
Thomas Clark
60a294fbad Removed the old "parsing" interfaces
Change-Id: I94ff79f36d5b61f90c2f242fa06816bf3a3b7ac2
2014-07-29 17:34:39 -04:00
Thomas Clark
ed0df5432f Fixed CANJaguar::GetOutputVoltage for negative voltages
Previously, negative output voltages were unpacked incorrectly.

Now, they're requested as percentages, unpacked, and then scaled
in software based on the bus voltage.  The output voltage and
bus voltage shouldn't ever be out of sync, since they're in
the same message.

Change-Id: I745fffd0faa6cbaab967240271e6cfa8653212e2
2014-07-29 15:25:35 -04:00
Thomas Clark
6deb196e90 Support for the "USER" button on the RoboRIO
You can get the state of the USER button with GetUserButton() in
C++ or Utility.getUserButton() in java.

Change-Id: I923e62cab5e621ef43fed503acab5c0d751264fb
2014-07-29 14:42:08 -04:00
Thomas Clark
d66bafb687 CANJaguar::Disable stops periodic setpoints
Calling CANJaguar::Disable() now makes NetComms stop periodic
setpoint messages, so the motor actually stops until EnableControl()
is called again.

Change-Id: Ib4eb4ad5f729be5c74e799f02ed000511de1e03d
2014-07-29 11:09:37 -04:00
Joe Ross
c1d8e4ef4b Make AnalogInput PIDGet return an average voltage. artf2391 for Java.
Equivalent to Ia7f06ca2
Previously it returned a raw value instead of a voltage.

Change-Id: I6f1bcf8fdd7f98ae62ed991f29fec35f4ffb4098
2014-07-28 08:04:10 -07:00
Joe Ross
5a3889a3aa Correct voltage range in javadocs for RoboRIO
Change-Id: I6049fac62bb4f1fb15364bd26d0511d0603c0aee
2014-07-28 09:34:48 -04:00
Thomas Clark
6071fc7fb3 Fixed CANJaguar percent scaling issue [artf2637]
Percent mode used to be scaled incorrectly in Java because the
max output voltage was initialized to a wrong value.

Change-Id: If88bb2f1d198e13b1724afc62a522fbf91a14b5b
2014-07-25 13:01:24 -04:00
thomasclark
f958b65ba6 CANJaguar can be disabled [artf2647]
The CANJaguar class now stores a controlEnabled flag.  When disabled, it
won't verify the control mode, which involves sending enable messages.

Change-Id: I8baa48eec31de6b4d3fee2b5a074320542a1bbef
2014-07-25 12:59:47 -04:00
Jonathan Leitschuh
3ec797a8cf Updates the CANJaguar to free itself before throwing an exception in the constructor. This allows it to be allocated later without throwing an Allocation exception.
Change-Id: Ifbd15fecad92fa17a1c4b92d444b67221dacb4b5
2014-07-24 16:55:27 -04:00
Jonathan Leitschuh
2481e98bc8 Fixes a deallocation of the Relay resource when calling free. Changes fake "Enum Classes" into real Enumerations
Change-Id: I9d5a4760235adc9e02e41040c9973316e1f32da2
2014-07-24 13:59:21 -04:00
thomasclark
c81d510ebe CANJaguar::ChangeControlMode marks the controlmode as unverified
This previous caused a bug where the Jaguar would sometimes
behave as if it were in the wrong mode, even when everything was
verfied.

Change-Id: Id5b96e0f7e64066eaaa0e5be4ba53fca76ba0703
2014-07-24 13:54:01 -04:00
Alex Henning
2e1bd171a5 Added missing call to m_ds.waitForData()
It was accidentally deleted in a previous commit[1] and none of our
tests caught it. As a result iterative robot loops run too fast (using
extra CPU).

[1] https://usfirst.collab.net/gerrit/gitweb?p=wpilibj.git;a=blobdiff;f=WPILibJ/src/main/java/edu/wpi/first/wpilibj/IterativeRobot.java;h=0e936de8ec86a76e0a63ddbfc65ec2b88bc71725;hp=d4c5d38a14e29c926389ba1ae84fcbd09ee51f19;hb=HEAD;hpb=726ac3a3d272310b367b25f3c7e15ba6d07b957d;tflink=projects.wpilib/scm.WPILibJ

Change-Id: I663f8619406f26b7fa6fc12bce4444657b829d9f
2014-07-24 12:02:50 -04:00
Colby Skeggs
dc48dc7f7b Implemented FRCSim artf2628, fixed bugs in non-sim Relay.java and sim PWM.cpp.
Change-Id: Ic00fcd5026ce0570c79a65be178e45eeb94b3deb
2014-07-24 11:54:46 -04:00
thomasclark
66ba9a728e Fixed some bugs with CANJaguar verification in Java
Change-Id: I5f6510d53c806845f6bae5eb8fd9ebbc8fde054e
2014-07-23 16:33:57 -04:00
Alex Henning
26d101caf9 Restructure WPILibJ to share code.
wpilibJavaDevices now contains RoboRIO specific code and wpilibJava has
shared high level information. The restructuring was mostly just copy
and paste. The three big exceptions are Timer, RobotState and
HLUsageReporting. Those require some dependencies injection since that
appears to be the cleanest way to share the code.

Change-Id: Ie7011e32bc95953a87801a9905b3bfec7f8de285
2014-07-23 14:11:52 -04:00