Peter Johnson
32fa97d68d
clang-tidy: modernize-use-nullptr (NFC)
2020-12-29 14:26:19 -08:00
Peter Johnson
aee4603269
clang-tidy: modernize-pass-by-value
2020-12-29 14:26:19 -08:00
Peter Johnson
29c7da5f1a
clang-tidy: modernize-make-unique
2020-12-29 14:26:19 -08:00
Peter Johnson
67e03e625d
clang-tidy: modernize-use-equals-default
2020-12-29 14:26:19 -08:00
Peter Johnson
b124f9101b
clang-tidy: modernize-use-default-member-init
2020-12-29 14:26:19 -08:00
Peter Johnson
d11a3a6380
clang-tidy: modernize-use-override (NFC)
...
Add NOLINT to CommandTestBase due to gmock not adding "override" keyword,
which causes warnings on clang.
2020-12-29 14:26:19 -08:00
Austin Shalit
6e1919414e
[build] Bring naming checkstyle rules up to date with Google Style guide ( #1781 )
...
Also update Checkstyle to 8.38.
Google changed their style guide from the last time we imported it. This PR brings in those naming changes. The change they made is allowing single letter member, parameter, and local variable names. They also added a lambda naming scheme and I thought it would be good to bring that in too.
2020-12-29 09:27:48 -08:00
Tyler Veness
2b4317452b
Replace NOLINT(runtime/explicit) comments with NOLINT (NFC) ( #2992 )
...
cpplint.py can accept either, but clang-tidy requires NOLINT.
2020-12-28 15:10:31 -08:00
Peter Johnson
2aed432b4b
Add braces to C++ single-line loops and conditionals (NFC) ( #2973 )
...
This makes code easier to read and more consistent between C++ and Java.
Also update clang-format settings to always add a line break (even if no braces are used).
2020-12-28 12:58:06 -08:00
Peter Johnson
8f1f64ffb6
Remove year from file copyright message (NFC) ( #2972 )
...
Also update copyright to include "and other WPILib contributors" and clarify
license referral language to not be restricted to FIRST teams.
2020-12-26 14:12:05 -08:00
Prateek Machiraju
f0528f00e7
[build] CMake: Use project-specific binary and source dirs ( #2886 )
...
This ensures that allwpilib will still build correctly when added as a CMake external project.
2020-11-24 20:25:44 -08:00
Vasista Vovveti
f61726b5ae
[build] Fix cmake-config files ( #2865 )
...
In the cmake config files, SELF_DIR was being overwritten and was therefore incorrect.
This also adds wpimath as a dependency to wpilibc.
2020-11-15 22:38:55 -08:00
Prateek Machiraju
5fe8f9017f
[build] Refactor CMake flags ( #2788 )
...
The CMake enable/disable flags as currently structured are a confusing mix of
WITH, WITHOUT, and USE with odd defaults. This changes the flags to consistently
use WITH and default the build options to everything enabled.
2020-10-22 21:52:24 -07:00
Prateek Machiraju
0503225928
[build] CMake: Fix Metal linking on macOS ( #2725 )
2020-09-20 09:31:20 -07:00
Peter Johnson
3ed97f45fb
[cscore] Properly init variable in usbviewer ( #2702 )
2020-09-12 13:48:04 -07:00
sciencewhiz
3e41d92c18
[wpilib] Use misspell to fix spelling errors (NFC) ( #2674 )
2020-08-31 00:33:11 -07:00
Peter Johnson
4cf6947af7
[cscore] Add wpigui-based USB camera viewer
2020-08-30 06:48:52 -07:00
Thad House
fe6bfb1ba2
[cscore] Provide USB Camera VID and PID in Windows ( #2585 )
2020-07-10 13:16:14 -07:00
Thad House
21740fd2c5
[build] Add PDBs to jnicvstatic archives ( #2573 )
...
The tools plugin won't include them in the binary, but it will be easy to look them up if needed.
2020-07-05 22:11:42 -07:00
Peter Johnson
b5a38001dd
[cscore] Add support for changing the USB camera path ( #2547 )
2020-07-05 22:09:44 -07:00
Thad House
6e4ee8da2b
[cscore] Limit jnicvstatic exports to only C and JNI symbols ( #2565 )
...
Reduces risk even more about accidentally interfering with OpenCV.
2020-07-03 21:53:56 -07:00
Thad House
b1353e4d6e
[cscore] Fix jnicvstatic classifier ( #2561 )
...
The archive needed to be zip, additionally the library needed to statically link to cscore. All better now
2020-06-30 22:50:02 -07:00
Thad House
9f4de91554
[cscore] Add new jnicvstatic artifact type ( #2560 )
...
With the new extraction method, we would need to provide an opencv. However, all of our tools that use opencv use an alternate version of OpenCV, so that would interfere.
This adds an artifact where opencv is statically linked into cscore, but wpiutil is a shared dependency. This solves some shared state hacks, and the extraction works so much better, so its worth making this change to allow that
2020-06-30 20:39:52 -07:00
Tyler Veness
22c0e2813a
[build] Upgrade CI to clang-format 10.0 ( #1961 )
...
MacOS no longer ships 6.0, and Arch Linux's mesa GPU drivers are no longer compatible with LLVM 6.0.
2020-06-27 20:39:00 -07:00
Peter Johnson
4d275e4767
[cscore] Fix USB camera test failure ( #2556 )
...
Introduced by camera filtering in #2532 .
2020-06-27 16:14:18 -07:00
Peter Johnson
11fb0a4cb7
[cscore] EnumerateUsbCameras(): Only list capture devices ( #2532 )
...
Previously this would list ALL /dev/video* devices. In recent versions of
Linux this leads to listing duplicate devices, as many USB cameras provide
both a video device and a metadata device, and only the video device can
actually be used for streaming.
2020-06-13 20:51:46 -07:00
Peter Johnson
67554ef3b0
[build] Add .inl files to styleguide (NFC) ( #2506 )
...
No functional changes.
2020-05-05 18:17:50 -07:00
CircuitCraft42
0f313fb9ab
cmake: Improved portability of OpenCV Java binding search ( #2348 )
...
The CMake option OPENCV_JAVA_INSTALL_DIR can be set to the location
to search for the jar file. Note that the file name cannot be
changed, as, after checking several Linux package repositories,
that seems to be constant across all of them.
Fixes #2346 .
2020-02-10 17:30:54 -08:00
Peter Johnson
108ddfa1b4
Fix Pi Camera auto exposure property name ( #2258 )
2020-01-11 15:04:29 -08:00
Peter Johnson
790dc552ca
Add quirks support for Pi camera ( #2241 )
...
- Valid video modes (native modes plus some low-res modes)
- Exposure setting
2020-01-07 20:21:28 -08:00
Peter Johnson
b78f115fcf
Work around VS2019 16.4.0 bugs ( #2171 )
...
Work around frontend bug in scoped_lock and code generation bug in reverse_iterator in gtest.
See https://github.com/google/googletest/pull/2635
2019-12-14 10:48:19 -08:00
Banks T
b8c1024261
Fix PS3Eye VID and PID ( #2146 )
2019-11-30 12:35:47 -08:00
Peter Johnson
b058dcf64e
Catch exceptions generated by OpenCV in cscore JNI ( #2118 )
2019-11-22 08:12:17 -08:00
Banks T
2a76c996eb
Use VID/PID detection for PS3Eye ( #1977 )
2019-10-24 20:28:21 -07:00
Peter Johnson
c59f9cea5f
CameraServer: Add VID/PID support for Linux USB devices ( #1960 )
2019-10-20 14:12:00 -07:00
Thad House
0e3b0f3da7
Remove deprecated free() calls ( #1925 )
...
Replaced with the standard close()
2019-10-08 21:30:33 -07:00
Banks T
56d782b16c
Add secondary camera name for PS3Eye ( #1920 )
2019-10-06 22:18:49 -07:00
Banks T
2271570860
Fix PS3Eye exposure setting ( #1911 )
2019-09-30 15:09:39 -07:00
Thad House
bc59db5e6f
Rename DEBUG macro to DEBUG0 ( #1871 )
...
This avoids conflicts with the platform DEBUG macro on some platforms.
2019-09-06 20:45:52 -05:00
Thad House
76930250c0
Remove objective-cpp support ( #1816 )
...
Was only there for mac usb cam support, but we likely won't get to it this summer anyway,
and its causing a breakage in the backing libraries with cross builds
2019-08-09 16:28:53 -07:00
Tyler Veness
98d0706de8
Fix cscore build with OpenCV 4 ( #1803 )
...
The main change in OpenCV 4 was removing its C APIs from OpenCV 1. If
the user has OpenCV 4, they have no way of obtaining the correct
arguments for cscore functions that require the C API. Therefore, we can
fix the build by just not compiling in functions reliant on the C API if
OpenCV 4 is being used.
OpenCV 3 builds should continue to work with this change.
2019-08-03 16:10:39 -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
Tyler Veness
62be0392b6
Replace std::lock_guard and std::lock with std::scoped_lock ( #1758 )
...
std::scoped_lock was introduced in C++17 and is strictly better than
std::lock_guard as it supports locking any number of mutexes safely.
It's also easier to use than std::lock for locking multiple mutexes at
once.
2019-07-08 22:58:39 -07:00
Tyler Veness
841ef5d739
Remove template types from lock RAII wrapper usages ( #1756 )
...
C++17 has template type autodeduction. These wrappers include
std::lock_guard and std::unique_lock.
2019-07-07 19:17:14 -07:00
Peter Johnson
8757bc471b
Remove pre-C++17 shims ( #1752 )
...
Now that all compilers support C++17, remove some old C++14/C++17 shims.
2019-07-07 15:44:43 -07:00
Austin Shalit
f7cfdd7cee
Replace crlf line endings with lf ( #1731 )
2019-06-28 20:55:14 -07:00
Thad House
3dfb01d45b
Update to new Native Utils ( #1696 )
...
Also update to azure 2019 windows image
2019-06-28 14:09:10 -07:00
Peter Johnson
372ca4f456
cmake: Enable googletest unit tests ( #1720 )
...
Also don't inherit compile warnings from wpiutil
There's not a good way to disable inherited compiler flags.
2019-06-23 12:44:28 -07:00
Peter Johnson
1d0c05d4f8
Styleguide fixes for #1718 ( #1719 )
2019-06-14 18:51:49 -07:00
Peter Johnson
f07569df19
Fix newer GCC/clang compiler warnings ( #1718 )
2019-06-14 18:32:27 -07:00