Testing showed this wasn't an issue with timing, and allows for more
safety in user code making mistakes. Places where the extra thread
wouldn't help have been kept non threaded, using a new internal API.
Fixed undefined behavior when returning nullptr for T = std::string. Also added
support for smart pointers. T = std::unique_ptr<U> returns U* and T =
std::shared_ptr<U> returns std::weak_ptr<U>.
I can't find where the actual code is implemented, and I get errors if I
try to link or compile to any of its functions. Even CANJaguar doesn't
use them, nor did the old impl of CANTalon. Plus looking at the API it
makes no sense anyway, since it doesn't do any buffers , so I think its
worth it to remove it.
Removes CAN.h from the JNI header
We can't read [0] on an empty StringRef or the StringRef itself asserts
(this may crash in non-debug mode as an empty StringRef is not guaranteed to have a valid pointer).
Instead, we can just check if the StringRef is not empty.
Closes#502
Instance methods were kept around for backwards compat in Java. In C++,
the instance methods were changed to match Java. Also some cleanup to
the JNI layer to match updated variable types we missed.
Closes#416
Allows us to control multithreaded access and spurious wakeups easier.
closes#509
Switches DS to use new waitForData functionality
Adds a few new functions
HAL_GetPort both allocates the DIO and sets the DIO into DIO mode. The DIO setting was overriding the SPI setting on the port, so SPI chip selects were broken if you had more than one. Instead use CreatePortHandleForSPI, which is a special function that only allocates the DIO handle, but doesn't actually set the DIO into DIO mode.
The exceptions were removed from Java because these fail more often then
not. Teams are noticing this in C++ as well. In addition for some reason
ClearErrors() is causing about 0.5 seconds of lag. That's another issue,
but this will match Java and solve that issue for users.
Gradle needs to produce a platform path of "Linux/i386" when targeting a Linux 32-bit Intel platform. Otherwise, it doesn't match Java's os.name/os.arch when loading the ntcore library in NetworkTablesJNI.java. Windows uses "x86" but Linux uses "i386". (http://lopica.sourceforge.net/os.html)
MjpegServer uses the timeout to generate keep-alives to any clients
(which helps detect disconnects and avoid stale client threads).
CvSink GrabFrame now defaults to a timeout, but the timeout can be
changed by the user, or the old no-timeout version is now available
as GrabFrameNoTimeout.