Thad House
f62e23f1af
Add Doxygen for new HAL interfaces ( #2110 )
2019-11-20 16:21:07 -08:00
Thad House
6f6c6da9f5
Updates to addressable LED ( #2098 )
...
Only PWM Headers are supported, so enforce that.
Also fixes some init checks and init order checks.
2019-11-18 15:25:04 -08:00
Peter Johnson
a4c9e4ec28
Add AddressableLED simulation support
2019-11-18 00:51:59 -08:00
Thad House
8ed2059074
Add AddressableLED ( #2092 )
2019-11-17 16:39:38 -08:00
Thad House
db2c3dddd7
Use DMA Global Number for DMA Index ( #2085 )
2019-11-15 17:32:29 -08:00
Thad House
82b2170feb
Add DMA support to HAL and WPILibC ( #2080 )
2019-11-14 22:52:34 -08:00
Thad House
5510960068
Use kNumSystems for DutyCycle count in Ports ( #2083 )
2019-11-14 12:15:47 -08:00
Thad House
b7bc1ea745
Update to 2020v6 image ( #2078 )
2019-11-13 21:35:52 -08:00
Peter Johnson
c5a0497124
Add simulation pause/resume/step support
...
Calling HALSIM_PauseTiming pauses the FPGA clock and notifiers.
Calling HALSIM_ResumeTiming resumes the FPGA clock and notifiers.
Calling HALSIM_StepTiming steps the FPGA clock and runs applicable notifiers.
This will effectively pause TimedRobot and any other notifier-based events,
but of course will not pause user threads that do not use the notifier (e.g.
image processing).
2019-11-11 22:03:29 -08:00
Peter Johnson
f5446c7409
Add Notifier HALSIM access
2019-11-11 22:03:29 -08:00
Peter Johnson
3e049e02f0
Add name to HAL Notifier
2019-11-11 22:03:29 -08:00
David Vo
2da64d15f6
Make usage reporting enums type match ( #2069 )
...
This changes the C++ HALUsageReporting enums to have an
explicit type which matches the HAL_Report parameter
types. In practice this shouldn't change much except
for tooling that might be parsing this header.
2019-11-11 21:38:49 -08:00
David Vo
f04d95e50f
Make FRCUsageReporting.h C-compatible ( #2070 )
...
Now that HAL_Report has been moved into FRCUsageReporting.h,
this should also be C-compatible.
This also removes the C++ ifdef guard in HAL.h.
2019-11-11 21:38:24 -08:00
Thad House
9bcff37b93
Add HAL specific version of wpi_setError ( #2055 )
...
Cleans up error writing, and allows fewer headers to be included in many of the wpilibc cpp files.
This removes all usages of the hal/HAL.h header.
2019-11-08 22:53:20 -08:00
Thad House
326aecc9a0
Add error message for CAN Write Overrun ( #2062 )
2019-11-08 22:51:11 -08:00
Thad House
384d00f9e6
Fix various duty cycle bugs ( #2047 )
2019-11-06 14:05:25 -08:00
Thad House
1f6850adf2
Add CAN Manufacturer for Studica ( #2050 )
2019-11-06 14:04:27 -08:00
Thad House
39f46ceab6
Don't allow rising and falling values to be read from AnalogTrigger ( #2039 )
...
They can't be caught from user code
2019-11-05 20:42:01 -08:00
Thad House
d93aa2b6b2
Add missing lock in FRCDriverStation ( #2034 )
...
Switch newDataCounter to atomic
2019-11-05 20:41:16 -08:00
Thad House
1d695a1660
Add FPGA Duty Cycle support ( #1987 )
2019-11-01 23:41:30 -07:00
Thad House
2ad15cae19
Add multi PDP getter and sim PCM/PDP multi arg functions ( #2014 )
2019-11-01 21:55:35 -07:00
Thad House
931b8ceefd
Add new usage reporting types from 2020v5 ( #2026 )
2019-11-01 21:54:17 -07:00
Thad House
6f159d1426
Add way to atomically check for new data, and wait otherwise ( #2015 )
2019-11-01 17:09:28 -07:00
Thad House
1c1e0c9a6a
Add HAL_SetAllSolenoids to sim ( #2004 )
2019-10-30 21:29:35 -07:00
Thad House
f6b844ea30
Move HAL Interrupt struct to anonymous namespace ( #2003 )
2019-10-28 22:32:28 -07:00
Thad House
a72f809911
Add extern C to DigitalGlitchFilterJNI ( #2002 )
2019-10-28 22:30:04 -07:00
Thad House
a3820bbdfa
Remove HAL_BaseInitialize ( #1981 )
2019-10-24 20:26:11 -07:00
Thad House
a83fb47933
Update to 2020v5 image ( #1983 )
...
* Update to 2020v5 image
2019-10-24 12:14:22 -07:00
Thad House
103c1b121c
Remove DS caching from the HAL level ( #1971 )
...
With updates to netcomm, this is no longer required.
2019-10-23 20:25:07 -07:00
Peter Johnson
46ad95512e
SimDeviceData: Add missing null check
2019-10-21 16:16:17 -07:00
Thad House
46303a8221
Add messaging to extension loading in the HAL ( #1926 )
2019-10-09 22:25:02 -07:00
Peter Johnson
55a844a3e1
HAL sim: Add encoder channel B access
2019-10-06 17:28:39 -07:00
Peter Johnson
aa90645865
Add ability to associate other devices with a SimDevice
...
Implemented only for AnalogInput, DIO, and Encoder.
2019-10-05 22:39:00 -07:00
Peter Johnson
81c2c8a7de
Add simulation generic device/value support
...
This allows high-level library classes to implement enhanced simulation
support even if no low-level corresponding simulation library exists, and
avoids the need for bit-banging complex interfaces like SPI or CAN.
2019-10-05 22:39:00 -07:00
Peter Johnson
e8d6f8a2c1
Move mockdata/HAL_Value.h to hal/Value.h
...
Also prefix the MakeBoolean et al functions with HAL_ to avoid namespace
pollution.
2019-10-05 22:39:00 -07:00
Thad House
cb54602d49
Add support for writing RTR CAN Frames to the CAN API ( #1900 )
2019-09-28 16:49:34 -07:00
Thad House
9f740e5905
Use OS for serial port instead of NI VISA ( #1875 )
2019-09-28 16:49:11 -07:00
Peter Johnson
b23baf611a
Add ability to run robot main loop in a separate thread ( #1895 )
...
Default behavior is still to run the robot main loop in the main thread.
The ability to run the robot main loop in a separate thread and add a hook
for running a different function in the main thread is needed for simulation
GUI support on some platforms.
2019-09-28 15:43:24 -07:00
Thad House
8858ec55c7
Remove periodic can read call ( #1868 )
...
It is not necessary anymore, and is a complicated and confusing API to keep around.
2019-09-28 15:38:58 -07:00
CodingWithFusion
41efb8015d
Update CANAPITypes.h ( #1860 )
...
Add Playing With Fusion to CAN manufacturer list.
2019-09-28 15:33:18 -07:00
Thad House
c93be1b2d5
Remove LabVIEW HAL support ( #1901 )
2019-09-28 15:31:43 -07:00
Thad House
f49859ebfd
Remove NI VISA headers, as they are now included in NI Libraries ( #1879 )
2019-09-07 23:01:27 -05:00
Thad House
dd928b4cbf
Remove JNI logging ( #1872 )
2019-09-06 20:42:40 -05:00
Thad House
516cbef2c4
Remove RoboRIO ifdef from simulation headers ( #1859 )
2019-09-03 19:55:17 -07:00
Tyler Veness
1fb3011235
Add MathUtils.clamp() for Java ( #1861 )
...
Also use std::clamp() and MathUtils.clamp() in as many places as
possible in place of custom clamp functions or if statements.
2019-08-28 23:24:30 -07:00
Peter Johnson
a0be07c370
Refactor HAL handle move construction/assignment ( #1845 )
...
A templated hal::Handle class is used to wrap handles to make them move-only.
This eliminates a lot of boilerplate move constructor/assignment code
in the main WPILib classes. HAL_SPIPort and HAL_I2CPort are also wrapped.
The wrapper class does not implement destruction. This would require the
wrapper class to be handle-specific (rather than generic) and would result
in more code added than it removed, plus would add header dependencies on
more HAL headers. In addition, some HAL handle release functions are more
complex (e.g. have return values) and can't be easily mapped to a destructor.
2019-08-25 18:42:00 -07:00
Thad House
a4530243e1
HAL sim: Fix incorrectly setting dio port to initialized on cleanup ( #1813 )
2019-08-09 16:14:46 -07:00
Thad House
6411bd79c6
InterruptableSensorBase: Fix callback function deletion ( #1807 )
...
Save the callback function into a unique_ptr member instead.
2019-08-04 20:25:25 -07:00
Austin Shalit
df12fc2a86
Java cleanups ( #1776 )
...
* Remove extra ';'s
* Remove unnecessary conversions to String
* Use StandardCharsets object
* Replace infinite while with check for interrupted thread
* Remove redundant local vars
* Remove redundant throws clause
* Remove redundant primitive wrapping
* Fix malformed Nested class test
* Remove unnecessary unboxing
* Remove unnecessary explicit type argument
* Replace lambdas with method references
* Replace statement lambdas with expression lambdas
* Replace null check with method call
* Replace number comparison with method call
* Fix broken javadoc comments
* Replace Arrays.asList with singletonLists
* Remove excessive lambda usage
* Remove redundant string operation
* Remove redundant type casts
* Remove unnecessary returns
* Remove redundant suppressions
* Fix unresolved file reference
* static analysis fixes
2019-07-31 22:19:48 -07:00
Thad House
48fe54271a
Add HALSIM_SetSendError implementation ( #1773 )
2019-07-23 23:55:51 -07:00