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
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.
Unfortunately, due to the way NT synchronization is currently performed,
this has unexpected and undesirable behavior: when a dashboard (or any other
NT client) is left running between code restarts, when it reconnects, any
code settings will be overwritten by the NT synchronization process. As
fixing this will require a fairly major NT change (and likely a user-visible
one), it's not desirable to do at this point in the year.
Instead, disable NT driven settings entirely (e.g. make the NT interface
publish only). To emphasize the read-only nature of the NT values, attempts
to change the NT values will be immediately overridden by CameraServer.
To better inform users about the actual property names (e.g. for use in their
code), the "raw_" settings no longer have "raw_" removed from their names
(they are still placed in the "RawProperty" subtable).
This change also contains a couple of Java fixes:
* Make getInstance() thread-safe
* Properly synchronize access to m_tables between multiple threads.
* Use Hashtable instead of HashMap.
* Java SendableChooser now decorates with type (non-breaking change)
* C++ SendableChooser now is templated on the type instead of using void* and stores values (breaking change)
* C++ SendableChooser now uses llvm::StringMap instead of std::map
* Dedicated RoboRIO Toolchain, allow Toolchain Path to change
* Add cCompiler Tool to correctly discover RoboRIO GCC on Mac
* Add @333fred requests for GString and ToolChainPath
* Add Toolchain Path option to README
The current LabVIEW dashboard (Beta 4) requires the source type to be either
"usb:" or "ip:" and does not support "cv:". To work around this, use a source
type of "usb:" for OpenCV sources as well.
Workaround for #407.
The old method had a fairly large risk of undefined behavior, and the way the docs
were written could cause users to get confused.
Deprecate the old method and add StringRef method as preferred approach.
Also adds Java API for doing the same to Java threads (standard Java Thread.setPriority only works
when Java is run as root, even if the process has the right privileges).
Previously this would have allocated the std::string every time, even if
the message wasn't printed. Now takes a StringRef, and only converts to
std::string when the message actually gets printed.
This does a major cleanup on our gradle files, primarily converting all instances of manual dependency downloading to use the correct configuration-based method, which has the advantage of being both less code and more safe.
Updated to gradle 3.2.1. This also moves all of the task graph listeners for dependency setup to use the gradle model, making it both safer and reducing line count.
This makes our APIs more consistent. With optimizations enabled, doubles are just as efficient as floats on ARMv7, so we should take advantage of the extra precision.