Peter Johnson
301442ee43
Add json support to wpiutil.
...
This is a modified version of https://github.com/nlohmann/json .
It's been moved into the wpi namespace as many of the changes are not
compatible. The amount of template code has been significantly reduced,
enabling many functions to be moved out-of-line, and for the result to
build on older compiler versions (in particular GCC 4.8).
2017-07-28 21:55:03 -07:00
Peter Johnson
de9dd1180b
Include src/main/native/cpp when building test.
2017-07-28 21:55:03 -07:00
Peter Johnson
436ed4d1e3
Implement comparison operators for llvm::StringMap.
2017-07-28 21:55:03 -07:00
Peter Johnson
88aa273e55
license.txt: Add LLVM license.
2017-07-28 18:09:14 -07:00
Peter Johnson
d11d8409a8
license.txt: Remove leading asterisks
2017-07-28 18:09:14 -07:00
Peter Johnson
9385d1b6d8
GetJavaStackTrace: Provide llvm::StringRef excludeFuncPrefix. ( #3 )
...
This is a bit cleaner to use than the templated version (many compilers
have issues with templating on static strings, for example).
2017-07-28 18:08:54 -07:00
Peter Johnson
b90653f3e3
Logger: Add def_func and min_level constructors. ( #2 )
2017-07-28 18:08:31 -07:00
Thad House
1243cf04ea
Adds new build system to repo ( #1 )
2017-07-28 07:29:49 -07:00
Peter Johnson
3cfcbe9a95
Remove Scheduler.java from the sim path. ( #564 )
...
This is an old version and is duplicative of the shared Scheduler.java.
2017-07-27 00:41:56 -07:00
Thad House
4f5b5b1377
Adds gmock files
2017-07-27 00:04:00 -07:00
Tyler Veness
6bc793505d
Suppress MultipleTopLevelClasses warning ( #581 )
2017-07-26 23:15:00 -07:00
Austin Shalit
3b44160cff
Rearrange some method calls so methods fail faster ( #583 )
2017-07-26 23:14:35 -07:00
Thad House
d9586c8d38
Fixes JNI aliasing issues involving ControlWord and AllianceStation ( #575 )
2017-07-26 20:59:40 -07:00
Austin Shalit
74df3fac4e
Require non null ( #580 )
...
* Replace null checks with Objects.requireNonNull()
* Use PMD rule instead of checkstyle rule
2017-07-18 20:32:08 -07:00
Austin Shalit
06321b8e87
Fix encoder sourceA null check ( #579 )
2017-07-18 19:34:45 -07:00
Thad House
f3efb948fe
Switches CANJNI to use byte[] rather then ByteBuffer, and throws exceptions for invalid platforms ( #571 )
...
Fixes #567
2017-07-10 20:33:34 -07:00
Tyler Veness
432c03bf63
Updated Gradle to 4.0.1 ( #573 )
...
New PMD checks required modifying PIDController
2017-07-10 20:31:20 -07:00
Austin Shalit
bfd224278b
Fix Java MyRobot linting ( #572 )
2017-07-10 20:29:52 -07:00
Tyler Veness
822ea6abc8
Made SpeedController class organization consistent between languages ( #568 )
2017-07-09 19:43:56 -07:00
Tyler Veness
97437ee58b
Miscellaneous formatting and style fixes for integration tests ( #570 )
...
Added newline before comment block and replaced angle brackets around includes
with quotation marks. All other integration tests use quotation marks for WPILib
includes.
2017-07-09 19:27:43 -07:00
Thad House
aa7fe0db29
Fixes unused buffer warning on platforms other then athena ( #566 )
2017-07-09 08:59:26 -07:00
Thad House
237685d4a5
Fixes static initialization of HAL handles ( #565 )
2017-07-08 22:04:01 -07:00
Thad House
abbe630274
Gets WPILib building on windows and C++11 vs C++1y ( #561 )
2017-07-08 14:17:21 -07:00
Tyler Veness
89d3b08e77
Added TimedRobot ( #520 )
2017-07-08 07:50:56 -07:00
Thad House
f826216a28
Gets JNI compiling on all platforms ( #563 )
2017-07-08 07:48:27 -07:00
Austin Shalit
aa0a874ad0
Add periodic method to subsystems ( #528 )
...
Fixes #526 .
2017-07-02 23:02:41 -07:00
Thad House
2da26c0579
Make HAL_Initialize timeout configurable, makes result a bool, and makes Java an exception rather than assert. ( #557 )
2017-07-01 00:43:06 -07:00
Tyler Veness
d34c844900
Fixed function ordering in robot base classes ( #553 )
2017-06-30 22:12:28 -07:00
Tyler Veness
68b63632c4
Removed functions that have been deprecated for at least one year ( #551 )
2017-06-30 22:05:33 -07:00
Chris Gregory
d2de94778e
Remove memory leak in ConditionalCommand ( #537 )
...
This also properly handles nullptrs passed into ConditionalCommand
instead of having Undefined Behavior or NullPointerExceptions.
2017-06-30 22:01:21 -07:00
Austin Shalit
4fd4a50d41
Update Preferences to not use deprecated APIs ( #555 )
2017-06-30 19:38:32 -07:00
Tyler Veness
9d93820717
Replaced STL streams with LLVM's raw_ostream ( #344 )
...
std::cout and std::printf were replaced with llvm::outs() and std::cerr was replaced with llvm::errs().
2017-06-30 19:33:43 -07:00
Thad House
c57a7f0a41
Switches all notifiers created with the external API to be threaded ( #546 )
...
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.
2017-06-30 18:58:58 -07:00
Thad House
1d15fcd072
Prints error when HAL_GetFPGATime call fails in fpga_clock. ( #558 )
2017-06-30 18:46:50 -07:00
Thad House
e824b1129e
Adds way to reset and version all HAL handles ( #545 )
...
Useful in the sim to force a full reset. On roboRIO, the information is
still created and added, but is not checked because of speed
considerations.
2017-06-30 16:28:28 -07:00
Tyler Veness
0cd03c66e3
Remove deprecated Task class ( #550 )
2017-06-30 16:12:19 -07:00
Thad House
462b231dac
Adds function to HAL to free malloc'd joystick name ( #543 )
...
No safe way to do this with interop, so a function is needed.
2017-06-30 16:11:16 -07:00
Tyler Veness
e4a918850f
Fixed return value of SendableChooser<T>::GetSelected() for non-pointer T's ( #512 )
...
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>.
2017-06-30 15:37:22 -07:00
Thad House
d472af3517
Removes CAN.h from the HAL ( #556 )
...
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
2017-06-30 15:13:51 -07:00
Tyler Veness
98a587a347
Removed unused includes and added missing stdint.h includes ( #549 )
2017-06-25 09:05:49 -07:00
Aaron Pinto
5fd996876b
Fixed a typo ( #547 )
2017-06-04 00:34:11 -04:00
Sam Carlberg
f43675e2bd
Add functionality for getting the current network mode ( #202 )
...
Use bit flags to indicate a combination of network mode and status.
2017-06-02 17:25:20 -07:00
Sam Carlberg
417cf33f90
Expose ITable paths ( #200 )
...
Closes #196
2017-05-26 21:02:45 -07:00
Tyler Veness
b433d98c02
Replace std::stringstream with llvm::raw_svector_ostream ( #345 )
...
A few locations were changed to use std::ostringstream.
2017-05-15 23:10:40 -07:00
Thad House
7006672b06
Fixes hal shim from alias to using item ( #538 )
...
Fixes #536
2017-05-12 17:02:54 -07:00
Thad House
efec0c5cc3
Moves the HAL priority_ custom types to the hal namespace ( #532 )
...
There is a shim for backwards compatibility, just like the frc namespace.
As with the frc namespace, the library compiles without the shim.
2017-05-11 21:25:22 -07:00
Thad House
16e71eac43
Fixes assertions to not crash StringRef ( #534 )
...
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
2017-05-10 20:14:14 -07:00
Thad House
067b1f3ee0
Adds a way to get the native handle from SafeThread ( #198 )
...
Useful to wpilib to enable easier changing of RT priorities.
2017-05-09 22:04:57 -07:00
Thad House
3d2f41d081
Adds a way to get the native handle from SafeThread ( #198 )
...
Useful to wpilib to enable easier changing of RT priorities.
2017-05-09 22:04:57 -07:00
Thad House
68b62abb52
Adds chrono wrapper around fpga time ( #527 )
...
Useful for some of the scenarios in C++ where using the chrono wrappers
might be very helpful.
2017-05-09 20:29:29 -07:00