Commit Graph

245 Commits

Author SHA1 Message Date
Kevin O'Connor
e73b3ed7b5 Add methods for checking Watchdog status, ds status, and brownout status
Change-Id: I723c87d0c50612cbffbb81b0e039efd0ef05fcd0
2014-11-18 15:56:59 -05:00
Fredric Silberberg
c6891fc034 Added in new headers and libraries for image version 18. This image contains a change to fix artf3773, which switched setDataSem to be a pthread_cond_t variable instead of a mutex. As a result, a few new HAL functions had to be exposed over JNI, specifically the functions for MultiWait.
Change-Id: I28be07c8102acb078440ee74ded46527328dd271
2014-11-16 17:01:44 -05:00
Thomas Clark
6f4d6ed998 Add support for vision in C++
Add IMAQdx and its dependencies

Change-Id: I6befa563e96db224db83fb90985c86eb3e8d4f3e

Add a "CameraServer" class for C++

This class allows the driver station's camera viewer to interact with
a C++ program.  It includes both an automatic mode to send images from
a webcam to the dashboard in a background thread, and an option to
manually feed it IMAQ images.

Change-Id: I54fdb164c00dce165859c22f435be647dc9927cc
2014-11-16 13:06:49 -05:00
James Kuszmaul
f1476be276 Reverted accidental commits
Change-Id: Ieee3600da11df698f1025c85972acd979e486aa0
2014-11-14 15:28:48 -05:00
James Kuszmaul
9be6ee4712 CANTalon throttle works.
Fleshed out CANTalon interface; it currently works just to write a
throttle. The firmware doesn't fully support everything yet, so we are
still significantly limited.

Change-Id: I2868c4c168a8cb42cda754589777beef31ffd354
2014-11-14 15:21:12 -05:00
Thomas Clark
9050ea7e3d Generalize CANJaguar and CANTalon with a CANSpeedController interface in C++
CANSpeedController is a subinterface of SpeedController that adds method
prototypes and enums for all of the common smart speed controller features.

CANJaguar implements this interfaces.  CANTalon does too, but
most methods are stubs right now.

Change-Id: I67e0177d91e45444657280502a247d787ad5c74c
2014-11-14 15:21:12 -05:00
Thomas Clark
c1f68eb2b0 Stick the CanTalonSrx code in, get it to compile
There's a CANTalon class, but it doesn' do anything yet

Change-Id: Ib397db6fc0376f9de95e5efc42a223700be3dbca
2014-11-14 15:21:12 -05:00
Brad Miller (WPI)
fb53eea6b2 Merge "[artf3749] Repaired undefined behavior in takeMultiWait." 2014-11-13 10:07:50 -08:00
Brad Miller (WPI)
49f6b90d15 Merge "Removed the timing option from Iterative Robot Template since it conflicted with its purpose (artf3751)" 2014-11-12 12:50:27 -08:00
James Kuszmaul
f67849a9b1 [artf3749] Repaired undefined behavior in takeMultiWait.
Change-Id: Ieae7d602472f585db2a896cc76355a5c23d1d670
2014-11-12 15:21:53 -05:00
Kevin O'Connor
3ad31dd4d7 Implement user API for roboRIO power methods (fixes artf3728 and artf3537)
Change-Id: I7501a83dcdd81d45b298e044379ea4ac3670c742
2014-11-11 15:42:56 -05:00
Brad Miller
c3c7baa15c Removed the timing option from Iterative Robot Template since it conflicted with its purpose (artf3751) 2014-11-11 14:49:05 -05:00
Brad Miller (WPI)
da0cc0c83f Merge "Fixes for 0 based joysticks and joystick axes in simulation." 2014-11-07 08:33:33 -08:00
Brad Miller (WPI)
6e0637e771 Merge "Upped the limits for the output on some PID tests." 2014-11-07 08:31:59 -08:00
Brad Miller (WPI)
8d49d8255b Merge "Move SerialPort to HAL and add SerialPort support for Java Squashed commit of the following:" 2014-11-07 08:27:36 -08:00
Alex Henning
3b53f84c8f Fixes for 0 based joysticks and joystick axes in simulation.
Change-Id: I67608450d0818b38f6d5b5c709190433f2dc5cf5
2014-11-06 19:00:02 -05:00
James Kuszmaul
05bb3cdd71 Upped the limits for the output on some PID tests.
We were having issues with intermittent PID tests because one of the
motors on the test stand was sticky and needed a bit of a push to start.

Change-Id: Ic75cd38de867a74be3e4e445bd0d02323dfc4df8
2014-11-06 14:05:35 -05:00
Brad Miller (WPI)
de5e5ab405 Merge "[artf3709] Fixed PIDController loop timing." 2014-11-05 11:51:04 -08:00
Kevin O'Connor
6b6e5d9530 Move SerialPort to HAL and add SerialPort support for Java
Squashed commit of the following:

commit 4359262e2fef69b1646e3d76641fe622a78dfd89
Author: Kevin O'Connor <koconnor@usfirst.org>
Date:   Wed Oct 29 13:43:12 2014 -0400

    Add SerialPort to JNI and modify Java SerialPort to use it.

    Change-Id: Id3e6fa538a50e6a96274d8fb1be546dc396fc9c6

commit 114b192388c2fb01745cb3d5ad83612e9d66ea83
Author: Kevin O'Connor <koconnor@usfirst.org>
Date:   Tue Oct 28 15:46:06 2014 -0400

    Move Serial port handling to HAL and define serial errors

    Change-Id: I4cc73b64d71aafacb410bce080cb29e5fdf565a3

Change-Id: I35b729ad502137ee4c877a415d78007861991e31
2014-11-05 13:58:14 -05:00
Kevin O'Connor
fa20e6ca4f Check for fatal interrupt status on multiple interrupt methods to avoid hanging program (fixes artf3602)
Change-Id: I31cb499fd1641deec26001b719fd0a6f07d20692
2014-11-05 13:19:41 -05:00
Brad Miller (WPI)
e56aa87af4 Merge "Change Talon to use 1x update rate (fixes artf3733)" 2014-11-05 09:55:39 -08:00
Brad Miller (WPI)
aa643d8ba7 Merge "Update Interrupt Javadocs (fixes artf3492 and artf3602)" 2014-11-05 07:46:26 -08:00
Brad Miller (WPI)
1f8a3d5bf3 Merge "DigitalInputs are now automatically added the LiveWindow in both C++ and Java" 2014-11-05 07:43:52 -08:00
Kevin O'Connor
b898cec901 Change Talon to use 1x update rate (fixes artf3733)
Change-Id: I592147100058504c919bdd2f31d56580503f5bc2
2014-10-31 18:52:28 -04:00
James Kuszmaul
687e2c6711 [artf3709] Fixed PIDController loop timing.
For C++: The PIDController loop had been changed to run an infinite loop
with a Wait(period) rather than using the Notifier class to schedule
exact runs of the CallCalculate command. Essentially a revert to bb50f4b134,
accounting for more recent changes.

For Java: A similar problem had developed; essentially, a TimerTask used
to be used and at some point was changed to a Runnable. The Runnable had
an infinite loop with a Wait; TimerTask actually schedules things reasonably
(although it is not strictly real-time). Also, there were some
Thread-safety issues which I fixed.

Although Java and C++ had similar issues, they seem to have developed
these issues independently.

Changes have been tested on the GearsBot in both C++ and Java (and it
    works).

Change-Id: I478cb8bfd77cd2d031f8e343d0b8193b602dcc2a
2014-10-31 17:01:44 -04:00
Fredric Silberberg
345ceafa0d DigitalInputs are now automatically added the LiveWindow in both C++ and Java
Change-Id: Ic3520737841f2901becfdc99e3900e4e63da8822
2014-10-30 14:46:59 -04:00
Kevin O'Connor
fba155804e Update Interrupt Javadocs (fixes artf3492 and artf3602)
Change-Id: Iad66841266a2d5ff606f7e27e90f7c975143245c
2014-10-29 15:23:55 -04:00
Peter Johnson
7f30b6bff4 Don't raise exception for Joystick axis/POV out of active range. Shorten error message and change to Warning (filtered by DS by default)
Return 0.0 in this case (as it can be commonly caused by
the joystick not being plugged in).

Still raise exception (Java) / set error (C++) if the asked-for axis/POV
is higher than kMaxJoystickAxes/kMaxJoystickPOVs.

See artf3673.

Change-Id: I4847c5badb358ed08f01170724ec1446af2e4ab9
2014-10-27 15:36:48 -04:00
Brad Miller (WPI)
5b2520c35f Merge "Fixed building of the frcsim-libwpilibsim-cpp deb." 2014-10-27 09:40:22 -07:00
Alex Henning
fa8d7b843c Fixed building of the frcsim-libwpilibsim-cpp deb.
There is still a bug where the examples have been updated to use 0 based
joysticks, but the simulation libraries have not been updated. I'll fix
that as a separate commit focused on fixing the joystick APIs.

Change-Id: I3b358e67b7fa18b30d1fd2b53098659cfefdfd76
2014-10-26 20:43:50 -04:00
Brad Miller (WPI)
66b7a8b66e Merge "Use either DO PWM A or B not A and B and update javadoc to reflect 6 generators (artf3698)" 2014-10-24 12:10:42 -07:00
Brad Miller (WPI)
b85b0c8eb2 Merge "Keep Notifier firing after FPGA rollover (fixes artf3582), simulation may still have an issue with counter rollover" 2014-10-24 11:07:09 -07:00
Peter Johnson
c58fde19f9 Increase the number of joystick ports to 6.
Change-Id: I18a29a3a8c8f38b3b21c3e76eead3526b9d02875
2014-10-24 13:59:59 -04:00
Kevin O'Connor
003dc0dc2b Pass errors to DS in C++ and Java
Squashed commit of the following:

commit f317b3522e312cf7e7bb9eb0494f2f96a7f6363c
Author: Kevin O'Connor <koconnor@usfirst.org>
Date:   Mon Oct 20 17:15:46 2014 -0400

    Send unhandled exceptions back to the DS.

    Change-Id: I0e658fdb6d43593ee20457f20f71f4f4cd2d21c3

commit f834ef8c791945697ad483c27b4167eb917ac242
Author: Kevin O'Connor <koconnor@usfirst.org>
Date:   Mon Oct 20 16:05:24 2014 -0400

    Add StackTrace to Java errors

    Change-Id: I83b162afcc5f294703705770fbcd8623b0895539

commit 02e040b0c79067ce046ada29e26004e0460fceb0
Author: Kevin O'Connor <koconnor@usfirst.org>
Date:   Mon Oct 20 15:07:44 2014 -0400

    HAL Errors to DS in Java

    Change-Id: I5fb51e4066bbc26ea59ca513c03c5ec5ace98831

commit 03775ddc42b129c27fdf403f17f0796009311c3c
Author: Kevin O'Connor <koconnor@usfirst.org>
Date:   Mon Oct 20 13:38:18 2014 -0400

    Update AnalogInput to report errors for getting and setting sample rate

    Change-Id: I00eb78f52fc5b17a60bc84456f0ec9842cc40ef7

commit 4c10cb79612ae81e3cbb6bd4d6da8cf3b8955821
Author: Kevin O'Connor <koconnor@usfirst.org>
Date:   Mon Oct 20 11:46:03 2014 -0400

    Define errors in HAL

    Change-Id: I96595472e42ba61f0f3d0da17caf01a748d0422a

commit 56cb5dcd93e5e849a016f63ac9d0dc245a23eb2b
Author: Kevin O'Connor <koconnor@usfirst.org>
Date:   Fri Oct 17 10:59:29 2014 -0400

    Throttle errors (1 report per second per error code) and fix issue with GetTime conflicting with GetTime from Timer.h/Timer.cpp

    Change-Id: Ibe4dc2e400fc4671b240b876a46959256ea65ad7

commit 71c78826e548682ecd0c1548255f8a6552cece32
Author: Kevin O'Connor <koconnor@usfirst.org>
Date:   Thu Oct 16 16:41:04 2014 -0400

    Feed errors to DS from C++

    Change-Id: I009a7798499fd93e9fdd976ff00aa74c0bd094ae

commit 81030c6cee7f18a5ddf0e95c4e402a6cf7b5de6c
Author: Kevin O'Connor <koconnor@usfirst.org>
Date:   Thu Oct 16 16:40:50 2014 -0400

    Don't try to de-mangle lines without any symbols in them

    Change-Id: Icea02494b68f2ec9116d6cbf20a35a3a132234f8

Change-Id: If7717025b03914183736ccd95da5c9d49819a6f3
2014-10-24 13:23:17 -04:00
Brad Miller (WPI)
455654a95b Merge "Fix joystick issues [artf3707]" 2014-10-22 10:44:55 -07:00
Joe Ross
261b1857cd make getControlMode public. Was public in 2014.
Change-Id: I158f41e66407d47c50e3d632661a040c8cd68d14
2014-10-22 13:36:38 -04:00
Kevin O'Connor
f3fe64a60e Keep Notifier firing after FPGA rollover (fixes artf3582), simulation may still have an issue with counter rollover
Change-Id: I11d86bd65c1e0db123d93aa143b8c8c3b823737a
2014-10-22 13:36:17 -04:00
Thomas Clark
a56c0eb4af Fix joystick issues [artf3707]
Make axes and POVs 0-based like they are on the DS

Correct default joystick axis numbers to be 0-based

Fix array dimensions for joystick axis values

Increase the number of joystick ports to the maximum 6 that the DS supports

Change-Id: I16d0e6e636188cbdd9cd7bfa0453a62466a55093
2014-10-22 11:49:55 -04:00
Brad Miller (WPI)
53255a764f Merge "Relay: Allow "On" state to be set via SmartDashboard." 2014-10-22 07:30:29 -07:00
Kevin O'Connor
62790c0f47 Use either DO PWM A or B not A and B and update javadoc to reflect 6 generators (artf3698)
Change-Id: Id8d29831c97accd54dd359c6f20a447d8eed59db
2014-10-21 14:33:02 -04:00
Brad Miller (WPI)
76f9b3bbc2 Merge "Adding stdint.h to the Joystick.h makes the indexer work (fixes artf3505)" 2014-10-20 07:47:31 -07:00
Thomas Clark
e51c3daf00 Set RobotBase instance in constructor [artf3652]
Also, remove the dead code that appeared to set the singleton instance,
but isn't actually run.

Change-Id: I1967026295b97f0c5e64256f2c701569da2a2091
2014-10-20 10:41:01 -04:00
Brad Miller
dc89ec673a Adding stdint.h to the Joystick.h makes the indexer work (fixes artf3505)
Change-Id: I6fee6d8ae0089fd4ffc2f043270bc719058f4b2d
2014-10-19 20:16:51 -04:00
Joe Ross
042a1dbc82 make preferences check for [ and ] in key
Change-Id: If60e87f1f141678ba261c7bf77aa26a12aa97a8b
2014-10-19 17:52:15 -04:00
Peter Johnson
615d62a219 Relay: Allow "On" state to be set via SmartDashboard.
Change-Id: I350be338045e6d27aaaea2740695930dcdd202fa
2014-10-18 08:24:11 -07:00
Brad Miller (WPI)
436c92961b Merge "Add new joystick features" 2014-10-17 14:08:49 -07:00
Brad Miller (WPI)
eab34bbb88 Merge "Add SD methods with default values to match Java (fixes artf3648)" 2014-10-17 13:47:47 -07:00
Thomas Clark
8a541a67ca Add new joystick features
Axis counts other than six and POVs are both present in C++ and Java now

Add dynamic joystick axis counts, up to 12

Change-Id: Ieade5e61a89df822df8702cb32326e4635558778

Add support for POVs in C++

Change-Id: I12dc0fcaca605a256ddcf990eebde45767229171

Make POVs work in Java

Change-Id: Ie2d98adb416c1930f058bdd21c3e7d26289df503
2014-10-17 16:39:10 -04:00
Kevin O'Connor
fea52a77a3 Add SD methods with default values to match Java (fixes artf3648)
Change-Id: Iee955f987ac1214d773cfd733ed99e3cbd1ac3d0
2014-10-15 17:03:04 -04:00
Kevin O'Connor
4e31b68008 Add method to get Device ID to Can Jaguar (fixes artf3613)
Change-Id: I7b0cb555a56ee97cf90ea32a3080b7c14bb5ca56
2014-10-15 16:11:29 -04:00