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
Peter Johnson
cfa1ca96f2
[wpilibc] Make ShuffleboardValue non-copyable ( #3430 )
...
This avoids the possibility of it being accidentally sliced by users.
2021-06-11 20:16:35 -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
Peter Johnson
9e1b7e0464
[build] Fix clang-tidy and clang-format ( #3429 )
...
Use the official ubuntu packages on 20.04; don't use ubuntu-latest.
2021-06-10 20:46:21 -07:00
Tyler Veness
a77c6ff3a2
[build] Upgrade clang-format and clang-tidy (NFC) ( #3422 )
2021-06-10 11:13:09 -07:00
Tyler Veness
099fde97d5
[wpilib] Improve PDP comments (NFC) ( #3427 )
...
Also remove HAL doxygen comments from sources;
these functions already had more descriptive comments in their
corresponding headers.
2021-06-10 00:02:51 -07:00
Tyler Veness
f8fc2463ee
[wpilibc, wpiutil] Clean up includes (NFC) ( #3426 )
2021-06-10 00:00:06 -07:00
Tyler Veness
e246b78846
[wpimath] Clean up member initialization in feedforward classes ( #3425 )
2021-06-09 23:59:31 -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
Tyler Veness
8284075ee4
Run "Lint and Format" CI job on push as well as pull request ( #3412 )
...
This makes the formatter run when pushing to local forks before a pull
request is made.
This is not run on the main branch.
2021-06-08 23:22:40 -07:00
Tyler Veness
f7db09a128
[wpimath] Move C++ filters into filter folder to match Java ( #3417 )
2021-06-08 21:21:01 -07:00
Tyler Veness
f9c3d54bd1
[wpimath] Reset error covariance in pose estimator ResetPosition() ( #3418 )
...
This also fixes a member function name inconsistency between languages
and adds missing documentation to C++'s KalmanFilterLatencyCompensator.
Fixes #3229 .
2021-06-08 21:20:43 -07:00
Tyler Veness
0773f4033e
[hal] Ensure HAL status variables are initialized to zero ( #3421 )
...
HAL functions don't set the status variable on success, so it's possible
to use the status variable in an uninitialized state.
2021-06-08 21:18:59 -07:00
Peter Johnson
d068fb321f
[build] Upgrade CI to use 20.04 docker images ( #3420 )
2021-06-08 12:27:22 -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
80f1d79218
[wpiutil] Split function_ref to a separate header
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
2abbbd9e70
[build] clang-tidy: Remove bugprone-exception-escape ( #3415 )
...
This generates warnings for using fmt::print() in main(), which is a
case we're okay with.
2021-06-06 17:47:14 -07:00
Tyler Veness
a5c471af7e
[wpimath] Add LQR template specialization for 2x2 system
...
A differential drive has this dimensionality (2 velocity states and 2
voltage inputs).
2021-06-06 16:45:12 -07:00
Tyler Veness
edd2f0232c
[wpimath] Add DARE solver for Q, R, and N with LQR ctor overloads
...
This is useful for implementing implicit model following.
2021-06-06 16:45:12 -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
4f1cecb8e7
[wpiutil] Remove Path.h ( #3413 )
...
This was missed in the std::filesystem change.
2021-06-06 15:50:28 -07:00
Prateek Machiraju
b336eac343
[build] Publish halsim_ws_core to Maven
2021-06-06 15:04:25 -07:00
Prateek Machiraju
2a09f6fa45
[build] Also build sim modules as static libraries
...
This allows sim modules to be statically linked into an executable to
create a "perfectly static" simulated desktop program. The entry point
was changed to be unique when building static libraries to avoid symbol
collisions.
2021-06-06 15:04:25 -07:00
Thad House
0e702eb799
[hal] Add a unified PCM object ( #3331 )
2021-06-05 22:36:39 -07:00
Tyler Veness
dea841103d
[wpimath] Add fmtlib formatter overloads for Eigen::Matrix and units ( #3409 )
...
This allows using Eigen matrices or units natively with fmt::format() or
fmt::print().
2021-06-05 21:10:41 -07:00
Tyler Veness
82856cf816
[wpiutil] Improve wpi::circular_buffer iterators ( #3410 )
...
The implementation of wpi::circular_buffer has been effectively replaced
with a dynamically sized copy of wpi::static_circular_buffer with a
resize() member function.
2021-06-05 21:08:12 -07:00
Tyler Veness
8aecda03ed
[wpilib] Fix a documentation typo ( #3408 )
...
"indicated" was misspelled.
2021-06-05 13:35:03 -07:00
Thad House
5c817082a0
[wpilib] Remove InterruptableSensorBase and replace with interrupt classes ( #2410 )
2021-06-05 11:25:21 -07:00
Tyler Veness
15c521a7fe
[wpimath] Fix drivetrain system identification ( #3406 )
...
The units for angular Kv and Ka were inconsistent with the derivation. A
second factory function overload was added for angular units that uses a
trackwidth to convert to the other form.
Notice how section 15.2 of https://file.tavsys.net/control/controls-engineering-in-frc.pdf
defines the angular feedforward as u = Kv,angular v instead of u = Kv,angular + omega.
The units cancel for elements of A but not B, so just the B matrix was incorrect in our code.
This breaks existing C++ code since the units are part of the function
signature.
2021-06-05 11:22:05 -07:00
Thad House
989de4a1bf
[build] Force all linker warnings to be fatal for rio builds ( #3407 )
...
This will make sure we catch any bugs for missing runtime dependencies before they become bigger problems.
2021-06-05 11:20:09 -07:00
Tyler Veness
d9eeb45b03
[wpilibc] Add units to Ultrasonic class API ( #3403 )
2021-06-01 21:54:56 -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
01dc0249de
[wpimath] Move SlewRateLimiter from wpilib to wpimath ( #3399 )
...
Timer was replaced with wpi::Now() to avoid a dependency on other wpilib
classes.
2021-05-31 10:35:54 -07:00
Tyler Veness
93523d572e
[wpilibc] Clean up integration tests ( #3400 )
...
The command and shuffleboard integration tests were removed because
their unit tests counterparts already provide adequate coverage. Java
already removed these.
2021-05-31 10:21:34 -07:00
Peter Johnson
4f7a4464df
[wpiutil] Rewrite StringExtras for std::string_view ( #3394 )
...
Remove unused functions and add StringRef-like convenience functions.
Minimize header dependencies.
2021-05-28 23:42:58 -07:00
Tyler Veness
e09293a15e
[wpilibc] Transition C++ classes to units::second_t ( #3396 )
...
A lot of these are breaking changes. frc::Timer was replaced with the
contents of frc2::Timer. The others were in-place argument changes or
removing deprecated non-unit overloads.
2021-05-28 22:06:59 -07:00
Prateek Machiraju
827b17a52b
[build] Create run tasks for Glass and OutlineViewer ( #3397 )
2021-05-28 22:04:58 -07:00
Peter Johnson
a610379965
[wpiutil] Avoid MSVC warning on span include ( #3393 )
2021-05-26 23:14:04 -07:00
Peter Johnson
4e2c3051be
[wpilibc] Use std::string_view instead of Twine ( #3380 )
...
Use fmtlib where needed for string formatting into std::string_view.
2021-05-26 17:44:18 -07:00
Peter Johnson
50915cb7ed
[wpilibc] MotorSafety::GetDescription(): Return std::string ( #3390 )
...
This is only called in an error condition, so it's not necessary to over
optimize it.
2021-05-26 07:25:32 -07:00
Tyler Veness
f4e2d26d58
[wpilibc] Move NullDeleter from frc/Base.h to wpi/NullDeleter.h ( #3387 )
...
frc/Base.h was also deleted because it's now empty.
2021-05-26 07:24:53 -07:00
Peter Johnson
cb0051ae60
[wpilibc] SimDeviceSim: use fmtlib ( #3389 )
...
Also clean up several sim classes to use the channel constructor.
2021-05-26 07:23:13 -07:00
Tyler Veness
a238cec12b
[wpiutil] Deprecate wpi::math constants in favor of wpi::numbers ( #3383 )
...
The constants were moved from std::math to std::numbers before
ratification in C++20.
2021-05-26 00:09:36 -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
Tyler Veness
e7d9ba135c
[sim] Disable flaky web server integration tests ( #3388 )
...
The digital output test sometimes fails on Linux and the digital input
test sometimes fails on macOS.
2021-05-25 20:56:35 -07:00
Tyler Veness
0a0003c110
[wpilibjExamples] Fix name of Java swerve drive pose estimator example ( #3382 )
2021-05-25 20:55:24 -07:00
Tyler Veness
7e1b27554c
[wpilibc] Use default copies and moves when possible ( #3381 )
...
The removal of ErrorBase allowed the defaults to be used in more places.
2021-05-25 20:54:39 -07:00
Tyler Veness
fb2a56e2d6
[wpilibc] Remove START_ROBOT_CLASS macro ( #3384 )
2021-05-25 20:53:26 -07:00