Austin Shalit
40cc743cc7
Enable checkstyle on cscore, ntcore, wpiutil ( #1032 )
...
Also update to version 8.10.
2018-05-24 00:31:04 -04:00
Thad House
cbaff52850
Implements AutoCloseable for types, replacing free() ( #1048 )
2018-05-22 23:33:17 -07:00
Thad House
680aabbe7c
Add new CAN API ( #1036 )
2018-05-21 16:09:38 -07:00
Thad House
11d46713d1
Fixes pessimistic std::move ( #1069 )
...
Also adds test to ensure all the sim headers get compiled
Closes #1068
2018-05-16 19:45:46 -07:00
Thad House
406e18663d
Switches NotifyListenerVector to SmallVector ( #1004 )
2018-05-14 18:17:34 -07:00
Thad House
e21a246a4d
Make the HAL self initialize when ever any initialization function is called ( #1012 )
2018-05-13 22:02:47 -07:00
Tyler Veness
6729a7d6b1
Run wpiformat on merged repo ( #1021 )
2018-05-13 17:09:56 -07:00
Thad House
337e89cf6e
Adds JNI Simulator interface and updated Sim API ( #1002 )
...
The simulator was generated by https://github.com/ThadHouse/SimulatorGenerator
2018-05-11 12:38:23 -07:00
Thad House
1046371349
Fixes some JNI issues with method calling and class storage ( #1043 )
2018-05-10 22:38:21 -07:00
Dustin Spicuzza
b7ea481bf9
Notifier: reset updatedAlarm before waiting ( #946 )
...
- If this isn't done, then the wait will always be performed at least twice
2018-05-04 18:29:42 -07:00
Thad House
954f8c40f5
Adds CMake Builds ( #1015 )
2018-05-02 21:15:30 -07:00
Thad House
f7bcf53059
HAL: wait for all objects to release handle before freeing ( #1011 )
...
This avoids a race on free.
2018-05-01 19:26:25 -07:00
Thad House
a098814ea0
Removes the make_unique shim for c++11 ( #1010 )
...
All of our compilers support c++14 now.
2018-04-30 10:28:34 -07:00
Peter Johnson
f84018af5f
Move entirety of llvm namespace to wpi namespace.
...
During shared library loading, a different libLLVM can be pulled in, causing
llvm symbols from dependent libraries to resolve to that library instead of
this one. This has been seen in the wild with the Mesa OpenGL implementation
in JavaFX applications (see wpilibsuite/shuffleboard#361 ).
This is clearly a very breaking change. For some level of backwards
compatibility, a namespace alias from llvm to wpi is performed in the "llvm"
headers. Unfortunately, forward declarations of llvm classes will still break,
but compilers seem to generate clear error messages in those cases
("namespace alias 'llvm' not allowed here, assuming 'wpi'").
This change also moves all the wpiutil headers to a single "wpi" subdirectory
from the previously split "llvm", "support", "tcpsockets", and "udpsockets".
Shim headers will be added for backwards compatibility in a later commit.
2018-04-30 10:22:54 -07:00
Peter Johnson
a8fd88840d
Revert "Uses ComputeDigitalMask function across HAL DIO ( #837 )" ( #1005 )
...
This reverts commit c84bd744c8 .
2018-04-29 21:48:53 -07:00
Thad House
c84bd744c8
Uses ComputeDigitalMask function across HAL DIO ( #837 )
...
less risk for errors in the future.
2018-04-29 21:12:15 -07:00
Thad House
7f88cf768d
New 2018 and later build setup ( #1001 )
2018-04-29 13:29:07 -07:00
Thad House
14228d82f3
Adds Direct port name Serial API ( #956 )
2018-03-05 19:41:09 -08:00
Thad House
82152e90fe
Adds defaults to PWM config ( #961 )
2018-03-03 01:56:49 -08:00
Dustin Spicuzza
1e7d439899
HAL Notifier: Don't disable the notifier manager when the last handle is cleaned up ( #960 )
...
- Addresses #959 , but not a good long term solution
2018-03-03 01:56:24 -08:00
Thad House
f5a292dadd
Adds TriState JNI entry point ( #938 )
...
Also adds missing sim TriState DIO HAL call, and a ToDo for later
2018-02-12 16:05:10 -08:00
Thad House
f720cbb121
Switches CtreCanNode to use locking and std::chrono for time ( #909 )
2018-02-01 21:39:06 -08:00
Thad House
c00848c060
Fixes indexed classed handle resource ( #899 )
...
Nothing in WPILib uses it, so it was not tested
2018-01-19 22:31:59 -08:00
PJ Reiniger
ca36d1dce6
Adding callbacks for notifying when the distance per pulse changes ( #861 )
2018-01-02 16:53:39 -06:00
Tyler Veness
0ef9803363
Update copyright year to 2018 ( #864 )
...
Also fix a few files with incorrect line endings.
2018-01-02 11:20:21 -06:00
PJ Reiniger
55b6764d50
Fix bugs in simulation libraries ( #853 )
...
Some thing got broken in the past couple of weeks with updates to the
HAL.
2017-12-31 14:37:14 -06:00
Jaci R
76b182600a
Add Low Fidelity NetworkTables simulation extension ( #823 )
2017-12-29 21:54:18 -06:00
Thad House
7eab4371f4
Adds TriState DIO functionality to the HAL ( #835 )
...
Adds a function to raw set the DIO direction. Also adds a C++ unsafe
function to enable fast setting of DIO direction.
2017-12-14 00:17:29 -08:00
Peter Johnson
7f074563d0
Add support for automatic SPI transfer engine. ( #836 )
...
The SPI Accumulator functions have been moved from HAL to wpilib and rewritten
to use the automatic transfer engine.
2017-12-13 23:41:37 -08:00
Thad House
d3dd586362
Revert "Fixes SPI bad chip select ( #818 )" ( #822 )
...
This is no longer required for image 2018v16.
This reverts commit b42285fddd .
2017-12-12 11:31:20 -08:00
Thad House
d2e7a90f41
Removes statics from hal sim ( #825 )
...
Based off of #824 , the equivelent in sim.
2017-12-10 19:38:53 -08:00
Thad House
8bd48d6c34
Switches HAL to manual instead of static initialization ( #824 )
...
Only athena.
Will fix a whole lot of init issues.
2017-12-10 18:02:07 -08:00
Thad House
aa4f0ef4f8
Start using the new FRC compiler define ( #797 )
...
Remove all definitions from the MockData headers when in simulation mode.
Add a constexpr IsReal and IsSimulation in RobotBase.
2017-12-08 22:47:21 -08:00
Thad House
b42285fddd
Fixes SPI bad chip select ( #818 )
...
Temporary workaround for 2018v13 image.
2017-12-08 21:42:30 -08:00
Thad House
8106fbdbea
Removes custom CONFIG_ATHENA compiler directive ( #796 )
...
In roborio GCC 5.5, __FRC_ROBORIO__ has been added directly to the
compiler. So we can instead use that to detect if we are build for the
roborio, and in a much more reliable way.
2017-12-08 21:40:11 -08:00
PJ Reiniger
33a08d5b34
Add halsim unit tests ( #783 )
...
Also adds function that can register all the callbacks at once.
Since all of the callbacks issue a string identifier, it makes it
possible and easy to have one function callback, and differentiate the
path to take based on the string. Hooking up all the callbacks at once
makes it easier for the simulator developer to know when something was
added to wpilib rather than looking at the commits.
2017-12-07 22:42:20 -08:00
Thad House
4e3af0756d
Removes workarounds for issues in image 10 ( #816 )
2017-12-06 21:20:03 -08:00
Thad House
5078f6c92a
Update to image 2018v13 ( #815 )
2017-12-06 21:02:36 -08:00
Tyler Veness
e9e407a87d
Replace C identifier lists with (void) ( #809 )
...
These changes were generated by wpilibsuite/styleguide#106 .
2017-12-04 20:05:51 -08:00
Thad House
0994364591
Fixes cross module base class statics ( #779 )
2017-12-03 00:05:05 -08:00
Peter Johnson
e3a2abdf97
HAL_SetDigitalPWMRate(): Use same logic as LabView. ( #794 )
2017-12-01 10:26:40 -08:00
Peter Johnson
65a044f633
Fix HAL_CleanNotifier race. ( #793 )
...
This race was caused by holding a lock while calling into FRC_ChipObject,
which was waiting for the callback to exit before returning, and our
callback wanted to grab the same lock.
2017-11-30 20:45:40 -08:00
sciencewhiz
7a250a1b93
Implement PCM One Shot feature. Fixes artf4731 ( #539 )
2017-11-26 12:55:21 -08:00
PJ Reiniger
12c4418bda
Added callbacks for CAN ( #757 )
...
Added callback scheme for a pass through to something higher
level. Since the ID is embedded into the arbitration ID, and some
devices can use different schemes whether it is plugged in through a
device or put into the daisy chain (pigeonImu), I made one "internal
data object" for max reusability.
2017-11-22 19:48:32 -08:00
Tyler Veness
ba879f4663
Cleaned up variable names for std::lock_guard and their associated mutexes ( #759 )
2017-11-22 17:10:21 -08:00
Peter Johnson
d214b36786
Change HAL notifier to polling. ( #627 )
...
This moves the thread code to the WPILib layer, fixing various potential
races and significantly simplifying the HAL implementation.
2017-11-19 17:58:40 -08:00
Peter Johnson
7f46b50b21
Unify WPI_Now and HAL_GetFPGATime. ( #743 )
...
Depends on wpilibsuite/wpiutil#56 .
2017-11-19 12:33:36 -08:00
PJ Reiniger
303c259b89
Simulate ADX* family of accelerometers and gyros ( #688 )
2017-11-18 12:31:51 -08:00
Thad House
cd1dbb1e3a
Adds a const buffer listener ( #742 )
...
Replaces need for const_cast in SPI and I2C functions
2017-11-17 10:01:49 -08:00
Peter Johnson
9021b37fd2
I2C: Provide byte[] JNI interfaces.
...
This avoids a direct byte buffer allocation on every read/write/transaction
on the byte[] variants.
Changes HAL I2C interfaces to use const for dataToSend.
2017-11-17 09:36:57 -08:00