Peter Johnson
a04d1b4f97
[wpilibc] DriverStation: Remove ReportError and ReportWarning
...
Change use cases to directly call FRC_ReportError.
2021-05-25 10:04:32 -07:00
Peter Johnson
3fe8fc75aa
[wpilibc] Revert "Return reference from GetInstance" ( #3342 )
...
This reverts commit a79faace1b .
This change will be superseded in a non-breaking way by changing to static functions and deprecating GetInstance() entirely.
2021-05-09 18:16:07 -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
a79faace1b
[wpilibc] Return reference from GetInstance ( #3247 )
...
Improves consistency across all classes.
Affects Preferences, LiveWindow, and CameraServer.
Old commands Scheduler::GetInstance() was not updated as this is already
deprecated.
2021-03-21 11:13:49 -07: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
Austin Shalit
65b2359b27
[build] Add spotless for other files ( #3007 )
...
Adds spotless formatting for Gradle, xml, md, and gitignore files.
yml linting is not performed as it requires a dependency on npm.
2020-12-30 16:17:20 -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
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
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
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
Austin Shalit
6e7c7374fd
[build] Globally Exclude PMD.TooManyMethods ( #2793 )
...
This was not a useful check, as every time we hit it, we simply excluded it.
2020-10-22 20:53:48 -07:00
Thad House
3cbec411c7
[build] Add package declaration check to checkstyle ( #2446 )
...
Co-authored-by: Austin Shalit <austinshalit@gmail.com >
2020-06-26 11:10:34 -07:00
Thad House
71a22861eb
Use ManagedStatic for CameraServer ( #2174 )
2019-12-20 14:20:38 -08:00
Tyler Veness
0b9307fdf3
Remove unused parts of .styleguide files ( #2119 )
2019-11-22 06:34:58 -08:00
Tyler Veness
9a8067465c
Fix incomplete .styleguide ( #2113 )
...
Also clean up other .styleguides.
Fixes #2111 .
2019-11-20 22:44:18 -08:00
Thad House
708009cd20
Update to gradle 6.0 ( #2074 )
2019-11-12 17:14:04 -08:00
Thad House
936627bd94
wpilibc: Remove direct CameraServer dependency ( #1989 )
...
This makes linking easier, particularly for third party vendors and other language wrappers.
2019-10-27 08:37:30 -07:00
Sam Carlberg
4b2b21d247
Replace outdated Java collections ( #508 )
2019-08-26 22:47:18 -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
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
Tyler Veness
27b697b084
Remove frc directory include shims ( #1714 )
2019-06-10 22:03:52 -07:00
Thad House
bb48ae391e
cmake: Move example programs into folders ( #1654 )
...
This looks cleaner in VS.
2019-06-10 20:04:34 -07:00
Thad House
fb1239a2ad
Add raw sources and sinks to cscore ( #1670 )
...
In some cases, we don't want the cv requirement to get an image, for instance interop with other versions of opencv
This enables getting a raw image, and handling conversions from the user side.
2019-05-30 21:12:05 -05:00
Thad House
90957aeea4
Move libuv to its own subfolder in build ( #1661 )
...
Allows using system libuv
* Fix Gradle Build and include dirs
* Update cmake find to support vcpkg libuv
2019-05-30 15:59:26 -07:00
Tyler Veness
f432f65bef
Update copyright year in license to 2019 ( #1524 )
...
Also update clang-format to 6.0.
2019-05-17 17:35:09 -07:00
Thad House
bdc822fad8
Only generate passthrough URLs for RoboRIO ( #1624 )
...
Otherwise accidentally, a race could occur between coprocessors and rio.
Java was done in both old and new locations as it's a race.
2019-04-27 20:35:23 -07:00
Austin Shalit
3cf4f38f5d
Fix build on macos10.14.4 ( #1648 )
2019-04-27 20:25:27 -07:00
Peter Johnson
60c2f59051
C++ CameraServer: initialize default Usb camera device number ( #1601 )
...
Otherwise just plain StartAutomaticCapture() starts with random number.
2019-02-14 22:39:40 -08:00
Peter Johnson
d55ca191b8
CameraServer: Add switched camera support ( #1600 )
...
This adds a new function "addSwitchedCamera" that creates and publishes a
virtual camera where the published stream information is consistent even if
the mjpeg server source is switched to a different camera.
Previously, changing the source of the mjpeg server resulted in updating the
stream information published for that source.
2019-02-14 22:05:40 -08:00
Peter Johnson
fdf298b172
CameraServer: Return MjpegServer from StartAutomaticCapture(VideoSource) ( #1544 )
2019-01-11 16:44:49 -08:00
Thad House
0d7d880261
Renable full Java 8 Compatibility ( #1493 )
2018-12-21 00:25:23 -08:00
Peter Johnson
dab7e1b7a2
Add multiCameraServer to cmake build ( #1477 )
2018-12-09 11:44:45 -08:00
Peter Johnson
bfe15245a6
Add multiCameraServer executable ( #1422 )
...
This standalone CameraServer reads its configuration from a json file.
2018-12-07 23:57:37 -08:00
Peter Johnson
ace37c517e
CameraServer: enable usb cameras on non-Linux platforms ( #1411 )
2018-11-09 20:27:23 -08:00
Peter Johnson
622ae29dff
CameraServer: Change opencv sources to publish "cv:" type ( #1412 )
...
The LabVIEW dashboard has been fixed to understand this prefix.
2018-11-09 01:13:39 -08:00
Thad House
a8aacd3657
Update build setup for raspbian and debug binaries ( #1384 )
...
- Build both debug and release binaries
- Append "d" to debug libraries in the style of opencv
- Split shared and static classifiers
- Add raspbian support
2018-10-27 00:19:38 -07:00
Thad House
11e5faf469
Use Array Constructor rather then new array to toArray ( #1368 )
...
A bit cleaner to use, and more standard for the current java. Still java 8 compatible.
2018-10-16 01:30:42 -07:00
Thad House
0c58a0a705
Repackage CameraServer classes ( #1321 )
...
This is necessary for modularization.
Move the wpilibj CameraServer classes to the cameraserver package.
Move the edu.wpi.first.wpilibj.vision package to edu.wpi.first.vision.
To avoid code breakage, add deprecated copies of the wpilibj classes to the wpilibj jar.
2018-09-23 21:20:12 -07:00
Thad House
a846ed062f
Add virtual destructor to CameraServerShared ( #1313 )
...
Fixes mac builds after update
2018-09-19 21:39:57 -07:00
Peter Johnson
d7b68f3f95
Unbreak cmake build ( #1285 )
2018-08-19 23:21:51 -07:00
Peter Johnson
195e101816
cscore: Use Twine instead of StringRef in API ( #1244 )
2018-07-29 12:53:41 -07:00
Austin Shalit
139b1720b2
Fix JavaDoc generation ( #1241 )
...
JavaDoc cannot handle redirects so HTTP link does not work anymore.
It also looks like javadoc.options was the wrong thing to set.
Options properly connects external docs to ours.
Re-enabled warnings so these things will pop out if they turn up again.
2018-07-29 09:28:41 -07:00