Having the HAL take a NATIVE_MULTIWAIT_ID without any way to get that
structure from extern "C" code is a problem. This makes it so it just
takes a MULTIWAIT_ID, and then grabs the native handle inside the HAL.
Change-Id: I06da18ba34adcea2f16e4e53da672f38be79e28e
Signed-off-by: Dustin Spicuzza <dustin@virtualroadside.com>
In the current HAL, once the port structures were created, there was no
way to free the structures. The way the C++ libraries were written this
wasn't a problem, since it grabbed a copy of each and stored them in an
array on bootup. However java does not do this, and grabs new ports
every time an object is created. This causes memory leaks if an object
is ever disposed in java. The same thing looks to be happening in
python, and C# does it too currently, but that would change if this gets
merged.
Adds java memory management fixes
Adds memory management to AnalogInput and Analog Output C++
SolenoidPorts and Digital Ports are all hold static arrays with their
port pointers (although solenoid overwrites them if a new solenoid on
the same module is created), however analog always grabbed new pointers.
I would fix the solenoid one, but I don't know what the ideal way to do
it would be.
Silently ignores free(null) calls by checking passed parameter is non-null.
Change-Id: Id32993b57b53f896e46e55c97541d3bd90b52648
builds two libraries, Athena and Desktop.
Simulation should use Desktop, Robots should use Athena
Also:
- copied Driverstation and Joystick from Devices into Sim
- Descreased dependency of pthreads in JNI.
- removed Simulation ifdef from non simulation
- added missing decprecated attribute for msvc
- removed usage reporting from sim
- removed unused pom.xml and constexpr
Change-Id: If8eb540f9434dce17c77a245fda6985713e80b2d
Implemented setTaskPriority() and getTaskPriority() in Task HAL API
Removed all other unimplemented functions in HAL and removed spawnTask()
Replaced instances of pthread_t* with TASK typedef
Removed unused HAL error constants and removed commented-out classes and functions in wpilibj's HALLibrary
Changed Task class API to match the construction semantics of a std::thread
Change-Id: I3bc951a3da90d24c5589fae4d1ca2bb60225c873
Currently, the JNI bindings are generated by Swig and, unfortunately,
the interface available through Java is lower-level than that for C++
(ie, direct access to the ctre code through the JNI bindings, rather
than an interface on top of that), but it does work.
See eclipse plugins for some short samples.
There are a couple of short unit tests as placeholders.
Still needs some cleaning up.
Change-Id: Iae2f74693ca6b80bf7d5aca0625c66aa6e0b7f85
Added quick samples for C++/Java CAN Talon stuff.
Change-Id: I3acb27d6fd5568d88931e0d678c09973d436735d
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
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
Add all of the most recent headers and .SOs
Also make DriverStation work with the new FRC comm protocol, using the new
functions for getting status data
Change-Id: I1c7fc5f90e72c5fbebf87d9923ce0967ed0ef3bc
Initial HAL support for v13 ds
Change-Id: I9a7f37ef8e24241598fa3981cb3df30c07c52e0f
New ds stuff in the HAL
Change-Id: I025910625453baf63f79f49bbc70ba8b2f093f50
New ds stuff in C++
Joysticks are still todo
Driver station IO is pulled out
Change-Id: I1bb59037c097713bd943e7bef00e12f67f13c3ac
New ds works in C++ and Java. Joysticks still todo
Change-Id: Ic93f8686856761badc592eceaf05964f52355578
Make joysticks work again with the v13 image protocol
Change-Id: Ief7ee95d3398c2262ca07ab7d60499af3c8f60f7
You can get the state of the USER button with GetUserButton() in
C++ or Utility.getUserButton() in java.
Change-Id: I923e62cab5e621ef43fed503acab5c0d751264fb
Packing, unpacking, caching, receiving, and sending CAN messages can be done
with a thin wrapper around CANSessionMux now, removing the need for duplicated
code between different CAN devices and languages.
Change-Id: If40181e479f45a443db7a1c264437f7f89ff54d9