Commit Graph

192 Commits

Author SHA1 Message Date
Joe Ross
79fbbbc0dd Synchronize CANTalon documentation between languages.
Still lots of documentation needed.

Change-Id: I122d00fb0f4a9f57f3d479749ec02b2249856d2b
2014-12-31 19:18:52 -08:00
Brad Miller (WPI)
359a155915 Merge "Make 3 axis Accelerometers work in LiveWindow. Fixes artf3902." 2014-12-30 21:05:26 -08:00
Brad Miller
fb7f5e9de8 Add methods to retreive the FPGA index for counters and encoders and return the encoding type as an integer
Change-Id: Iaa4062ec124b968b27e7c812cc754032fcb354d2

Add methods to retrieve the FPGA index for counters and encoders and return the encoding type as an integer

Change-Id: If04dc291f39a9b331495d2b97a8b87d3ded71280
2014-12-30 23:23:04 -05:00
Joe Ross
7db63055f6 Make 3 axis Accelerometers work in LiveWindow. Fixes artf3902.
Change-Id: Iced12b3c408b0d7b8fe822a9f17a7992293bae7d
2014-12-30 19:59:25 -08:00
Brad Miller (WPI)
91b9812482 Merge "Add PDP LiveWindow code" 2014-12-30 11:57:28 -08:00
Thomas Clark
8ccf3d9c14 Add AxisCamera Java class
The API is basically the same as the C++ one.

The JNI function for Priv_ReadJPEGString_C was manually renamed, since the
python scripts don't name the C++ functions correctly, causing an
UnsatisfiedLinkError at runtime. If further changes are made to the bindings,
either the method will have to be manually renamed again after the code is
regenerated, or the python scripts will have to be updated.

The old ignored edu.wpi.first.wpilibj.camera package was removed.

Change-Id: Icd37fc15c7bb41061568c3b2f580c6765cbf0300
2014-12-30 02:17:03 -05:00
Joe Ross
230fa2d168 Add PDP LiveWindow code
Change-Id: Ia3f4d8118d9068d021994fd2e5aca676d7dfa979
2014-12-29 21:10:21 -08:00
Joe Ross
d165f57e6e Clean up misc documentation
Change-Id: Ib0a4a7a389fb657d78d8b8bce4fcaeed67c3693d
2014-12-29 15:10:41 -08:00
Kevin O'Connor
4c0b2c18ab Write lib version from Java (fixes artf3788)
Change-Id: Ie40db6c993d12aadb66b07fcfdc0a62b87a2e2ed
2014-12-29 16:06:11 -05:00
Kevin O'Connor
b4c5a3af77 Update Javadocs for Java (fixes artf3761 and artf3953)
Change-Id: I0b5e752e8f6377770163dcdc61aa79ad4c7cbe94
2014-12-29 16:02:07 -05:00
Omar Zrien
548941dd99 Artifact artf3925 : PCM : Can't find any user facing java/C++ API for getting/clearing PCM faults
Change-Id: If5cb5b08f685158c5317233c4d9bc8e688138df7
2014-12-26 19:40:39 -05:00
Fredric Silberberg
3c4a1d9a1a NIVision Forward Port
Ported the NIVision libraries from the old NIVision implementation to
the new autogenerated JNI bindings.

Change-Id: I7c68ca6abef1185d59a9787e9a269d720c825e2f
2014-12-24 16:39:46 -05:00
Brad Miller
a55f34646d Encoder/Counter Fixes
This fixes all encoder variants with the getRate and getPeriod methods.
The clock speed in the HAL was updated, as was the scaling factors for setting
the stall periods. A default of .5 seconds is now set for the max period.
Additionally, a long standing bug was fixed with Java 2x encoders.

Changed tests to take into account the increased default timeout on encoders

Change-Id: I8b54c07ea467154be94d7ae7e9ada1775933dee4
2014-12-23 20:13:41 -05:00
Omar Zrien
aae20ddbff Artifact artf3945 : CANTalon : Motor Safety Object never feed
Change-Id: I6894399d0eb7c36ff698639862fa6ad045a70db8
2014-12-21 16:47:03 -05:00
Brad Miller
ee0d835304 Remove an extra constructor from a bad merge
Change-Id: I0475eef143814ebf8ee4ec71a019872420442c4f
2014-12-18 18:28:15 -05:00
James Kuszmaul
6080a3b186 Duplicate of gerrit 739; changed method from public to private.
Change-Id: Ib15210ff0e5d8d99a649397499bab4737a1a489e
2014-12-18 16:08:46 -05:00
Omar Zrien
3d06a763a2 CanTalon : Adding config routines for limit switch normally open vs normally closed.
They already existed in Labview, so this will keep parity
New C++/Java funcs
ConfigFwdLimitSwitchNormallyOpen
ConfigRevLimitSwitchNormallyOpen

Change-Id: Ifd65ead827838e7158f7261c67adc3738c72eabf
2014-12-18 15:57:26 -05:00
Omar Zrien
e1480ec798 Noticed that if changeControlMode() is called every teleop loop, it causes motor to stutter as it enters and immediately leaves kDisabled.
A simple improvement was to only perform the disable-before-next-set strategy if the caller's request mode is not equal to the current mode.

To keep things simple, SetControlMode was renamed to private method ApplyControlMode so we can still invoke it from c'tor.
Then, the new impl'n of SetControlMode() just calls ApplyControlMode() when caller's request mode is different.  That takes care of direct-calls from team source, and indirect calls through enableControl().

Applied to both c++ and java.
Tested in java so far...

Change-Id: I934c06c5339d933918470659acd635e12eb4d113
2014-12-18 15:54:47 -05:00
Omar Zrien
a5d9ba412c Second pass through all the HAL functions and cpp/java API. Filled in some parity holes between java and cpp.
Java...
added setStatusFrameRateMs() to modify the frame rate for status frames
added missing func that already exists in c++
	isFwdLimitSwitchClosed()
	isRevLimitSwitchClosed()
	getNumberOfQuadIdxRises()
	getPinStateQuadA()
	getPinStateQuadB()
	getPinStateQuadIdx()
added getAnalogInRaw() that doesn't count overflows (for potentiometers).
added setStatusFrameRateMs() to modify the frame rate for status frames
added getBrakeEnableDuringNeutral()

C++...
added GetAnalogInRaw() that doesn't count overflows (for potentiometers).
added SetStatusFrameRateMs() to modify the frame rate for status frames
added GetBrakeEnableDuringNeutral()
added kLimitMode_SrxDisableSwitchInputs to CANSpeedController::LimitMode

Patch set 2: Joe Ross, fixed two javadoc errors

Change-Id: I0bf871e138953de60eeacb547dc359f2125b1327
2014-12-18 15:51:47 -05:00
Omar Zrien
2434515d41 artf3913
Increased wait delay to 4ms to cover worst case delays for solicted signal getters.
Specifically....
-Get firmware vers
-Get P,I,D,F gains
-Get IZone, Get CloseLoopRampRate
-Get IAccum (integral accumulator)

Change-Id: I313ea984832cce5182af8e5af5e775837fd54fdc
2014-12-18 15:49:29 -05:00
Omar Zrien
c093a553ee changed variable type of closeLoopRampRate in setpid to double from int. It's represents V per sec since it calls setCloseLoopRampRate() underneath.
The other remaining closeloopramprate changes are also merged into this commit, so they may be redundant on gerrit.

Change-Id: Ic3108bb3669e487009b8f52412da3c2f44c42f6f
2014-12-18 15:11:39 -05:00
Brad Miller (WPI)
15ff7f5038 Merge "Added the getButtons method back that reads all the buttons at the same time" 2014-12-18 10:33:11 -08:00
Brad Miller
c17ba98f72 Added the getButtons method back that reads all the buttons at the same time
Change-Id: I0f7f35b6a70f861911166de7be3802547ff4b2eb
2014-12-18 10:57:11 -05:00
Omar Zrien
bea9eb0efa renamed param to match function name.
Change-Id: I89c483691e0f99a6d20bed1271209a8141e71c0e
2014-12-16 20:05:30 -05:00
Brad Miller (WPI)
786e844a9f Merge "Fix ControllerPower 5v faults and add javadocs. Fixes artf3918." 2014-12-16 08:07:30 -08:00
Joe Ross
170b5860ee Fix javadoc compile errors that broke build.
Change-Id: Ie110743154f842dc3a2e756f7917e3aa131c87bd
2014-12-15 19:03:27 -08:00
PetaroMitaro
26c50ebe02 fixed java CameraServer
Change-Id: I34b8c1e2ff05199afdcab579f7ac7188fbe40fd7
2014-12-15 19:45:56 -05:00
Joe Ross
6fdd491081 Fix javadoc warnings.
Change-Id: I37049f234c6dfddc138121822525794d74e1b74c
2014-12-15 18:48:46 -05:00
Fred Silberberg (WPI)
fe4535dfa0 Merge "Resolved artf3579: robot can no longer be enabled until robotInit() finishes in IterativeRobot; similar options available by overriding prestart() for other base classes." 2014-12-15 15:39:21 -08:00
Brad Miller
636e2e13ad Wrong package declaration in camera server
Change-Id: Ia35d7f78d37aa0db51eb98901364fc228dabaa53
2014-12-15 13:40:25 -05:00
PetaroMitaro
d3f5b74668 added CameraServer.java
Change-Id: I4c41b560d879ffc6d8aa4681cad8f75297fe6cda

Fixed some issues with the camera server class

Change-Id: Ifda524b55f84053be004a404a2890905ded7b266
2014-12-15 11:00:49 -05:00
Brad Miller (WPI)
8116bbd15b Merge "Fix various bugs in nivision wrappers." 2014-12-15 05:42:07 -08:00
Peter Johnson
37052246a5 Fix various bugs in nivision wrappers.
- IMAQdx typedef overrides were being ignored, resulting in incorrect types
(e.g. IMAQdxSession was a long instead of an int).

- Allocated byte buffers byte order was not being set.

- imaqDispose was incorrectly named.

Change-Id: I5d038d45e82755615f0a5bb928defb98f557f93e
2014-12-15 02:44:07 -08:00
Joe Ross
a649d3b553 Fix ControllerPower 5v faults and add javadocs. Fixes artf3918.
5V faults was returning count of 3.3V faults. Copied javadocs from
C++.

Change-Id: I95b5c6ed1213ed235ecde11ef7e28ad05aabca6e
2014-12-14 16:55:22 -08:00
Omar Zrien
6a7e7cf611 Two param constructor added to C++/java CANTalon so caller can optionally specify the periodMs at which the talon control frame is sent.
The param is capped in the HAL C++ class to [1ms, 95ms] so that zero and negative periods are caped to 1ms, and so that caller can't pass an absurdly large value, which causes TALON is appear disabled.

Change-Id: I4207194be25a33bbd6ad281a75301ce6684659a5
2014-12-14 17:09:52 -05:00
Brad Miller (WPI)
77997e52fb Merge "added PDP methods to javalib" 2014-12-14 07:34:56 -08:00
Peter Johnson
e655072efc Synchronize access to buffered Joystick data.
Change-Id: Iae453872e89c7b6364d486a6bbc8b210c94defee
2014-12-14 10:22:18 -05:00
Brad Miller (WPI)
0427fc34c4 Merge "Check for negative button value and add missing newline." 2014-12-14 07:07:01 -08:00
Brad Miller (WPI)
e33d80be14 Merge "Add USB serial port option. Uses kUSB for ALSR3" 2014-12-14 07:05:52 -08:00
Brad Miller (WPI)
8381eee185 Merge "Wrap IMAQdx functions." 2014-12-14 06:57:00 -08:00
Colby Skeggs
1c24096cc9 Resolved artf3579: robot can no longer be enabled until robotInit() finishes in IterativeRobot; similar options available by overriding prestart() for other base classes.
Change-Id: I07fde4b1bd2fae0c2e2a04336639b44ec715628a
2014-12-14 01:22:41 +00:00
Omar Zrien
3a684d28b2 PWM timing change for SP and SRX. added 3us to outer bounds
Change-Id: Idce12f8290b5f5646d0d3b14c2a4414fba3120cd
2014-12-13 18:06:43 -05:00
Joe Ross
8786b242b2 Add USB serial port option. Uses kUSB for ALSR3
Change-Id: Ie43fa14fff6aa2f332d3ebacfba099984f8b4eb7
2014-12-13 11:52:27 -08:00
Peter Johnson
b29a4bebf2 Check for negative button value and add missing newline.
Change-Id: I407ab2e0090c22b08503c6de0460d6c1291fa07f
2014-12-13 02:37:35 -08:00
Peter Johnson
db0b421019 Wrap IMAQdx functions.
Quite a few functions aren't wrapped, but the most critical ones for
vision should be.

This also fixes a couple of issues:
- nivision_arm.ini (and imaqdx_arm.ini) are now generated without need for
  running the output on the RoboRIO.
- enum values are generated even if the value is not directly specified.
2014-12-13 00:32:20 -08:00
Kevin O'Connor
8efe998270 Make VictorSP and TalonSRX use correct bounds (give an extra 1us on min and max to ensure saturation). Fixes artf3914 for C++ and Java
Change-Id: Ia1a848e011615e4ff50b9f5ef6e1017764aeb904
2014-12-12 18:09:44 -05:00
Brad Miller (WPI)
34d3d756ea Merge "Update javadoc for RobotDrive. Mecanum methods are implemented." 2014-12-12 05:11:06 -08:00
Brad Miller (WPI)
61a5fcce18 Merge "Squashed commit of the following:" 2014-12-12 05:10:34 -08:00
Peter Johnson
574f2e692a Java nivision: Add RawData to wrap void*.
Change-Id: I8a5dc2a208a39b3c0a26a1a9f906a5c19738628d
2014-12-11 22:19:08 -08:00
Kevin O'Connor
827341caa2 Squashed commit of the following:
commit c8543f97f77a0fef282b6598ae094ac75ea1dd22
Author: Kevin O'Connor <koconnor@usfirst.org>
Date:   Thu Dec 11 16:41:08 2014 -0500

    Go back to buffering Joystick data.

    Change-Id: I0b4204bfc6e81f50dc4a01c58cfbe14a771e902f

commit a8ddee2a923749903aafe2a8121171b1d70750e7
Author: Kevin O'Connor <koconnor@usfirst.org>
Date:   Fri Dec 5 17:38:58 2014 -0500

    Add error for using non-existent button 0. Fixes artf3870.

    Change-Id: I5b83cc7e3f0e4ab957279a877c76eeab6cb4b77b

Change-Id: Iae36482fd82176a9e09da1cfdfb69591411b2be2
2014-12-11 16:47:29 -05:00