Tyler Veness
9c2723391b
[cscore] Add [[nodiscard]] to GrabFrame functions ( #3479 )
...
Closes #3086 .
2021-07-11 09:41:12 -05:00
Tyler Veness
866571ab41
[wpiutil] Upgrade to fmtlib 8.0.0 ( #3457 )
2021-06-21 20:57:42 -07:00
Tyler Veness
04e64db945
Remove redundant C++ lambda parentheses (NFC) ( #3433 )
2021-06-12 08:06:45 -07:00
Peter Johnson
f60994ad24
[wpiutil] Rename Java package to edu.wpi.first.util ( #3431 )
...
This is more consistent with wpimath being edu.wpi.first.math.
2021-06-12 01:17:09 -07:00
Tyler Veness
4d9ff76433
Fix documentation warnings generated by JavaDoc (NFC) ( #3428 )
...
Some C++ Doxygen comments were updated to reflect any wording changes.
See `rg "(@return|@param \w+) TODO" | less` for list of incomplete docs.
2021-06-10 20:46:47 -07:00
Tyler Veness
a77c6ff3a2
[build] Upgrade clang-format and clang-tidy (NFC) ( #3422 )
2021-06-10 11:13:09 -07:00
Tyler Veness
c1e128bd5a
Disable frivolous PMD warnings and enable PMD in ntcore ( #3419 )
...
Some valid warnings like throwing NullPointerException or using a for
loop instead of System.arraycopy() were fixed.
Abstract classes marked with PMD.AbstractClassWithoutAbstractMethod were
made concrete because they already had protected constructors.
Fixes #1697 .
2021-06-09 07:01:00 -07:00
Peter Johnson
8d054c940c
[wpiutil] Remove STLExtras.h
...
This is a very inefficient header, and it's good to remove to discourage
its use. Only a handful of use cases remained, and of only array_lengthof.
2021-06-06 21:35:50 -07:00
Peter Johnson
64f5413253
Use wpi::span instead of wpi::ArrayRef across all libraries ( #3414 )
...
- Remove ArrayRef.h
- Add SpanExtras.h for a couple of convenience functions
2021-06-06 19:51:14 -07:00
Peter Johnson
b2c3b2dd8e
Use std::string_view and fmtlib across all libraries ( #3402 )
...
- Twine, StringRef, Format, and NativeFormatting have been removed
- Logging now uses fmtlib style formatting
- Nearly all uses of wpi::outs/errs have been replaced with fmt::print() or
std::puts()/std::fputs() (for unformatted strings).
- A wpi/fmt/raw_ostream.h header has been added to enable
fmt::print() with wpi::raw_ostream
2021-06-06 16:13:58 -07:00
Peter Johnson
fe570e000c
[wpiutil] Replace llvm filesystem with C++17 filesystem ( #3401 )
...
Use ghc::filesystem as fill on older GCC (e.g. RoboRIO).
This can be removed once all GCC platforms have upgraded to 8.1 or later.
File open functionality has been retained from LLVM but moved to "fs" namespace
and tweaked for improved consistency with std::filesystem (e.g. error_code is
passed by reference instead of returned).
Also update WPILibC's Filesystem functions to return std::string.
2021-06-01 21:50:35 -07:00
Tyler Veness
393bf23c0c
[ntcore, cscore, wpiutil] Standardize template impl files on .inc extension (NFC) ( #3124 )
2021-05-25 22:19:30 -07:00
Thad House
6b50323b07
[cscore] Use Lock2DSize if possible for Windows USB cameras ( #3326 )
...
Can remove a memory copy in many cases. This also fixes a bug where any mjpeg cameras on windows wouldn't work if the fast path was taken.
2021-05-01 07:07:37 -07:00
Peter Johnson
3abe0b9d49
[cscore] Move java package to edu.wpi.first.cscore ( #3294 )
...
This is more consistent with the other Java packages, and also is more
correct, as we own the first.wpi.edu domain but not the full wpi.edu domain.
2021-04-10 11:42:41 -07:00
Peter Johnson
ba6fe8ff2e
[cscore] Add USB camera change event ( #3123 )
2021-01-31 18:52:48 -08:00
Peter Johnson
29bf9d6ef1
[cscore] Add polled support to listener
...
Change Java VideoListener to use polling.
2021-01-31 17:06:37 -08:00
Peter Johnson
f5e0fc3e9a
Finish clang-tidy cleanups ( #3003 )
...
* Add .clang-tidy configuration.
* A separate .clang-tidy is used for hal includes to suppress modernize-use-using
(as these are C headers).
* Add NOLINT where necessary for a clean run.
* Add clang-tidy job to lint-format workflow. This workflow is now only run on PRs.
To reduce runtime, clang-tidy is only run on files changed in the PR.
Two wpilibc changes; both are unlikely to break user code:
* BuiltInAccelerometer: Make SetRange() final
* Counter: Make SetMaxPeriod() final
After these cleanups, the only file that does not run cleanly is
cscore_raw_cv.h due to it not being standalone.
2021-01-01 10:27:49 -08:00
Peter Johnson
daf3f4cb1a
[cscore] cscore_raw_cv.h: Fix error in PutFrame() ( #3019 )
2020-12-31 12:34:37 -08:00
Peter Johnson
7372cf7d99
[cscore] Windows NetworkUtil.cpp: Add missing include
2020-12-31 12:18:06 -08:00
Peter Johnson
b7e46c558f
Include .h from .inc/.inl files (NFC) ( #3017 )
...
This helps both IDEs and linting tools.
Also add some missing braces.
2020-12-31 11:26:53 -08:00
Peter Johnson
a751fa22d2
[build] Apply spotless for java formatting ( #1768 )
...
Update checkstyle config to be compatible with spotless.
Co-authored-by: Austin Shalit <austinshalit@gmail.com >
2020-12-29 22:45:16 -08:00
Peter Johnson
cbe59fa3bf
clang-tidy: google-explicit-constructor
2020-12-29 14:26:19 -08:00
Peter Johnson
c97c6dc065
clang-tidy: google-readability-casting (NFC)
2020-12-29 14:26:19 -08:00
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
sciencewhiz
3e41d92c18
[wpilib] Use misspell to fix spelling errors (NFC) ( #2674 )
2020-08-31 00:33:11 -07:00
Thad House
fe6bfb1ba2
[cscore] Provide USB Camera VID and PID in Windows ( #2585 )
2020-07-10 13:16:14 -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
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
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