Commit Graph

24 Commits

Author SHA1 Message Date
Thomas Clark
a2dfffeddc Add encoder indexing support in C++
Java will be done tonight or tomorrow

Change-Id: I3a3287a197b6f071c261172eb8ec930693e8b3c7
2015-01-07 00:06:45 -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
Dustin Spicuzza
0d8c454727 Don't fail silently if DIO or PWM allocation fails
Change-Id: I800c429507c3436c2d49561ba279700ad52569fe
2014-12-16 14:24:14 -05:00
Kevin O'Connor
4c5b8c8c46 Correct off-by-one error in DigOut PWM Gen B HAL code (fixes artf3705 for C++/Java)
Change-Id: I4cd65089690463b69cfe815bd078d744fb21ff0f
2014-11-11 15:40:48 -05: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
Thomas Clark
023d20abc1 Fix segfault in DIO PWM generators [artf3653]
The HAL PWM generator functions tried to interpret ID numbers as int pointers
instead of ints, leading to segfaults whenever PWM generators were used.

Change-Id: I51d50162a8fc04a04795e7ca20a23de26b9e848d
2014-10-19 16:27:47 -04:00
Kevin O'Connor
a3995a202d Fix bitfield indexing on PWM Latch
Change-Id: I63b423dbcab9f0f8b5b384654824f1c69b0fa052
2014-10-07 16:52:21 -04: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
Kevin O'Connor
d72ee199fe Squashed commit of the following:
commit a3ccfab0a42414aa169792356bfc47ee8d0d2d7b
Author: Kevin O'Connor <koconnor@usfirst.org>
Date:   Tue Sep 23 13:56:59 2014 -0400

    Implement zero latch (used to reduce brownout latency) in Java

    Change-Id: I3bf4ffbf20cf3d8a42da4fa1755b4306c49ede34

commit 0af37dfcc0d1172974519c44126973c302385d55
Author: Kevin O'Connor <koconnor@usfirst.org>
Date:   Tue Sep 23 13:03:07 2014 -0400

    Implement zero latch (used to improve brownout latency) in C++

    Change-Id: I62bedd1af65d367c32e2ab0b5a4fc679776eecb5

Change-Id: Ic27f37a9ab45aad82c1f7154d4edfbccfaa19229
2014-09-26 17:20:57 -04:00
Kevin O'Connor
59473ab7a7 Move PWM allocation to HAL to allow for checking against DIO allocation
Re-number MXP DIO to match pinout (include SPI and I2C pins) (fixes artf2664)
Change PWM MXP mapping to accommodate DIO re-mapping
This re-implementation also fixes artf2668 for C++ and Java
Change the test bench to reflect this change also

Change-Id: If30bd6a85a9f1f619fbde06a4ecd595a15fd28f7
2014-08-07 10:43:50 -04:00
Thomas Clark
f4ace4a36d Cleaned up C++ compiler warnings
All C++ projects now build without warnings with -Wall and -Wextra

Change-Id: Idb6cf8b78274a30453e98c1e8edabcfb2a7fffb6
2014-08-05 11:51:00 -04:00
Thomas Clark
792e3b6ccc Removed modules from the HAL and JNI bindings
Modules aren't used anymore in wpilibc and wpilibj, so the hal functions
that references them and and JNI bindings for these functions have been
pulled out.

Both Counter classes were also modified because they still referenced
modules.

Change-Id: Ic01feb145a4ed5f08cd55f140867c721f5ee7b10
2014-08-01 15:01:28 -04:00
Kevin O'Connor
02a28c8f04 Add allocation checking for I2C MXP. Update DIO counts in Lib layer until resource checking moves down to HAL
Change-Id: I0abe80bcbe9cbbc81f0887a1cd1a3aa0862df5f1
2014-07-17 15:22:53 -04:00
Kevin O'Connor
b128828977 Update Digital Pin count to reflect full 16 DIO on MXP
Change-Id: I180dee11c2c2a7e0585f153ba4b1832bce2bd6d3
2014-07-17 15:22:52 -04:00
Kevin O'Connor
1a1a12316b Remove JNA hack no longer being used
Change-Id: If85d24003524af71d47115ac0ef31ebc88b70f42
2014-07-17 15:22:51 -04:00
Kevin O'Connor
343c7f4f3e Port SPI to roboRIO. Java SPIDevice renamed to SPI and rewritten to match C++ API.
Change-Id: I9b2c05a05cbe443331a5b6da6a6d7c7be751a5e7
2014-07-16 16:34:37 -04:00
thomasclark
cb9df310dc Encoders and counters work on the MXP
Change-Id: Ifeb0533dde53a1ccba841b29e2b86f6f4a1bb33f
2014-07-16 15:06:08 -04:00
Kevin O'Connor
b2000a20d0 * Fix issue if I2C initialized before DigitalSystem.
Change-Id: I97bbbebb60730ddaad337a4a5dd73c9f40556a86
2014-06-27 10:33:40 -04:00
Kevin O'Connor
605148456e * Add WriteBulk and ReadOnly to C++ I2C
Change-Id: If6082f6b92b4be5e328278ba536d5a7681082c9f (+4 squashed commit)

Squashed commit:

[86b4ae7] * Port I2C to roboRIO in JNI and Java. Left read method as a transaction and added readOnly. Left write as a single byte and added writeBulk. Need to go back to C++ and update to match.

Change-Id: I290d84211a4b7bb942d785730c0e6929449cf69f

[7d37419] * Remove HiTechnic sensors from Java. May be added back later as examples

Change-Id: Ie93e23a70fd953c99c03d50d9529220f86d32e03

[e62bfbf] * I2C ported to roboRIO i2clib in HAL and C++

Change-Id: Idb0e8cee5a1e8c1a0b0733ca94b528f659352915

[1059a48] * Remove HiTechnic sensors (Lego connector) may be added back as examples later

Change-Id: I84b8e1e022db2c69d487ed9ad5b3ec0e7ea57282 (+2 squashed commit)

Squashed commit:

[e62bfbf] * I2C ported to roboRIO i2clib in HAL and C++

Change-Id: Idb0e8cee5a1e8c1a0b0733ca94b528f659352915

[1059a48] * Remove HiTechnic sensors (Lego connector) may be added back as examples later

Change-Id: I84b8e1e022db2c69d487ed9ad5b3ec0e7ea57282
2014-06-23 18:23:14 -04:00
thomasclark
29c4534c58 Added support for digital and analog IO pins on the MXP
Change-Id: I3a4e14ceab885d19a615d6cd45f22a2250ad2856
2014-06-12 09:09:46 -04:00
thomasclark
35ac240d4c Switch to 0-based for all pins on the RoboRIO [artf2564]
Change-Id: I249965a9d55aec53b7d8a9be3ba5cc43500ddda4
2014-06-10 12:44:29 -04:00
Patrick Plenefisch
9b831ed34c Reverting back to static .a files for C++ and fixing lots of other assorted items 2014-05-27 21:26:10 -04:00
Patrick Plenefisch
848a043f99 Fixing some compile warnings in C++
--HG--
extra : source : 84601b0b128cb508e13a1ae23fd648acc52990c8
2014-05-02 17:52:49 -04:00
Brad Miller
69d9ad70ab CMake Changes
This is the changes made by Patrick Plenefisch converting the native
code to use CMake and the CMake Maven Plugin, as opposed to the
native Maven plugin. This is to allow for compatibility with newer
versions of the GCC toolchain. All the cpp sources were moved from
maven style directories to cpp style directories for CMake.

Change-Id: I67f5e3608948f37c83b0990d232105a3784f8593
2014-04-01 11:18:29 -04:00