Commit Graph

102 Commits

Author SHA1 Message Date
Kevin O'Connor
cd29e1c32f Handle cases where no DS is attached (initial m_controlWord, reportError, getAlliance and getLocation) fixes artf3778
Change-Id: I6befa8e31e6762a101cd0a19641e558c955865b9
2014-11-18 16:54:06 -05:00
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
Fred Silberberg (WPI)
c7a90b2ccc Merge "Fix write when used with long byte array." 2014-11-17 11:56:51 -08:00
Joe Ross
ccd64090bb Fix write when used with long byte array.
If the byte array allocated is longer then the count passed to the
write method, there will be a buffer overflow exception. Only put
the number of bytes specified by count.

Change-Id: I10ff48d5a5cf3f82c4e4e347326be033db300cdb
2014-11-16 16:40:49 -08: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
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 (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
Kevin O'Connor
18de3aebdd Make sure the whole JVM exits if an exception is thrown. This prevents the DS thread, NT thread or any additional user thread from keeping the program alive when the main thread exits (fixes artf3743)
Change-Id: Ide89a3abe57171553af0a8c68077391b9a91fd29
2014-11-05 15:51:15 -05: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
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)
63bb8e1f32 Merge "Remove unimplemented sendErrorStreamToDriverStation method (fixes artf3617)" 2014-11-05 08:44:48 -08:00
Brad Miller (WPI)
c1e63acc14 Merge "Use ByteBuffer for conversion from raw sensor bytes to Java types (fixes artf2673)" 2014-11-05 08:44:20 -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
Kevin O'Connor
594d0d8029 Use ByteBuffer for conversion from raw sensor bytes to Java types (fixes artf2673)
Change-Id: Ic22c6569614a457cc4156541d79ed4ce05db8273
2014-10-31 14:03:20 -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
Kevin O'Connor
97f954aef6 Remove unimplemented sendErrorStreamToDriverStation method (fixes artf3617)
Change-Id: I35dc863b3318e22e503d95273812ab25a1ae0a70
2014-10-29 14:30:22 -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)
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
Peter Johnson
8ebf88b741 Java DriverStation.InTest: Set correct flag.
Change-Id: I99aa58f4fa4df13990cc310a0f21e9a9fd817eb0
2014-10-24 14:19:30 -04: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
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
Thomas Clark
be30d3ab1d Fix CANJaguar brownout recovery in Java
In Java, CANJaguar didn't set up periodic status messages again after
a brownout

Change-Id: Iaedd844a7627dd44eb5d769a106b220648f35023
2014-10-22 10:56:25 -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
Joe Ross
fc7c015823 Fix warnings for javadocs
Change-Id: I818c2086d69eff098543b4d5a554ba9d703e01e8
2014-10-19 16:48:16 -07:00
Thomas Clark (WPI)
c52e29432c Merge "make preferences check for [ and ] in key" 2014-10-19 14:57:42 -07:00
Joe Ross
042a1dbc82 make preferences check for [ and ] in key
Change-Id: If60e87f1f141678ba261c7bf77aa26a12aa97a8b
2014-10-19 17:52:15 -04:00
Peter Johnson
3365d0dc18 Fix Java Joystick.getPOV().
It subtracts 1 from pov; this should not be done here as it is done in the
DriverStation class.

Change-Id: I7fba2c87fc4dcb2f693201346b0d935662a49678
2014-10-18 09:22:58 -07: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)
5db5320793 Merge "Add method to get Device ID to Can Jaguar (fixes artf3613)" 2014-10-17 13:46:07 -07:00
Brad Miller (WPI)
54eaa913f6 Merge "Make Java ignore section headers in Preferences file and start file with [Preferences] to match C++ (fixes artf3629)" 2014-10-17 13:45:34 -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
Brad Miller (WPI)
7fa0eea492 Merge "ADXL345_SPI: Report usage." 2014-10-17 12:19:47 -07: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
Kevin O'Connor
dad3b68f36 Make Java ignore section headers in Preferences file and start file with [Preferences] to match C++ (fixes artf3629)
Change-Id: Ia56cca061851727eee25d3996314a01022378a07
2014-10-15 14:37:25 -04:00
Peter Johnson
ce768ae341 ADXL345_SPI: Report usage.
Change-Id: I369a3aecf36fc9071b10cbacc1ebac5f98c1dd39
2014-10-12 14:38:02 -07:00
Peter Johnson
fcc8230dbf Counter::setUpSource(AnalogTrigger): actually set the source.
Previously this created the output but didn't set up the source.

Change-Id: Ifac7ed589358e15bc70ba46ae4a756ce56683a8a
2014-10-10 09:15:42 -07:00
Brad Miller (WPI)
cb81aa6fe9 Merge "Update headers and .sos to v15 image + most API changes" 2014-10-07 07:22:14 -07:00
Thomas Clark (WPI)
ace43a6a12 Merge "DigitalOutput: Fix enablePWM()." 2014-10-07 07:18:19 -07:00
Peter Johnson
a65cb500fb Relay: In free(), set both forward and reverse to 0.
Also, check status in between the two calls.

Change-Id: I5a6c24aefde3707a953a41cb7c56e8fb372e1ea0
2014-10-06 00:31:46 -07:00
Peter Johnson
f27df43b5b DigitalOutput: Fix enablePWM().
Previously enablePWM() wanted m_pwmGenerator to already be non-null on entry.
This is impossible as the only place m_pwmGenerator is set is later in this
function.

Also add correct m_pwmGenerator null checks to disablePWM() and
updateDutyCycle().

Change-Id: Ia5bbfdc62824e1cf4c2f503308313b7ef39ae2fe
2014-10-05 20:51:57 -07:00
Thomas Clark
7e9f183cf9 Update headers and .sos to v15 image + most API changes
Java still does not work

Change-Id: I172ac401a07b6703909068f82b7b6cc67e6075c0
2014-10-05 17:17:59 -04:00
Brad Miller (WPI)
c11f194cbf Merge "Allow dataRecieved to be null in I2C transaction (fixes artf3603)" 2014-10-02 11:48:22 -07:00