Commit Graph

4690 Commits

Author SHA1 Message Date
Thad House
4e1fa03087 [build] Skip PDB copy on windows build servers (#3458) 2021-06-21 20:56:42 -07:00
Peter Johnson
b45572167d [build] Change CI back to 18.04 docker images (#3456)
This reverts commit d068fb321f (#3420).

The 18.04 docker images now use GCC 8, which was the original reason for
updating.  20.04 uses a much more recent libc, so staying with 18.04
enables more Linux platforms to use the binaries.
2021-06-20 23:03:29 -07:00
Tyler Veness
57a160f1b3 [wpilibc] Fix LiveWindow deprecation warning in RobotBase skeleton template (#3454) 2021-06-19 20:45:56 -07:00
Thad House
29ae8640d9 [HLT] Implement duty cycle cross connect tests (#3453) 2021-06-19 20:11:52 -07:00
Thad House
ee6377e54b [HLT] Add relay and analog cross connects (#3452) 2021-06-19 13:03:58 -07:00
Peter Johnson
b0f1ae7ea3 [build] CMake: Build the HAL even if WITH_CSCORE=OFF (#3449)
Also handle the case of WITH_WPILIB=OFF WITH_SIMULATION_MODULES=ON.
2021-06-19 09:30:49 -07:00
Tyler Veness
7aae2b72dc Replace std::to_string() with fmt::format() (#3451) 2021-06-19 09:30:01 -07:00
Thad House
73fcbbd748 [HLT] Add relay digital cross connect tests (#3450) 2021-06-19 01:21:56 -07:00
Thad House
e7bedde835 [HLT] Add PWM tests that use DMA as the back end (#3447)
Both a decent DMA test, and slightly more reliable PWM test.
2021-06-19 01:21:07 -07:00
Peter Johnson
7253edb1e1 [wpilibc] Timer: Fix deprecated warning (#3446) 2021-06-18 21:00:26 -07:00
Tyler Veness
efa28125c6 [wpilibc] Add message to RobotBase on how to read stacktrace (#3444)
Also make stacktrace info an error instead of a warning in both C++ and Java.
2021-06-17 23:52:48 -07:00
Thad House
9832fcfe14 [hal] Fix DIO direction getter (#3445)
Unset means input, where the code was assuming set means input.
2021-06-17 23:03:00 -07:00
Ryan Hirasaki
49c71f9f2d [wpilibj] Clarify robot quit message (#3364)
Co-authored-by: David Vo <auscompgeek@users.noreply.github.com>
2021-06-16 13:24:06 -07:00
Noam Zaks
791770cf6e [wpimath] Move controller from wpilibj to wpimath (#3439) 2021-06-16 07:45:51 -07:00
Noam Zaks
9ce9188ff6 [wpimath] Add ReportWarning to MathShared (#3441) 2021-06-16 00:52:24 -07:00
Peter Johnson
362066a9b7 [wpilib] Deprecate getInstance() in favor of static functions (#3440)
Co-authored-by: Noam Zaks <imnoamzaks@gmail.com>
2021-06-15 23:06:03 -07:00
Thad House
26ff9371d9 Initial commit of cross connect integration test project (#3434)
Adding as a separate project so current integration tests stay working.
2021-06-14 20:08:11 -07:00
Thad House
4a36f86c81 [hal] Add support for DMA to Java (#3158) 2021-06-14 19:56:42 -07:00
Peter Johnson
85144e47ff [commands] Unbreak build (#3438) 2021-06-14 07:35:21 -07:00
Peter Johnson
b417d961ec Split Sendable into NT and non-NT portions (#3432)
The non-NT portion has been moved to wpiutil.
The NT portion has been moved to ntcore (as NTSendable).

SendableBuilder similarly split and moved.

SendableRegistry moved to wpiutil.

In C++, SendableHelper also moved to wpiutil.

This enables use of Sendable from wpimath and also enables
moving several classes from wpilib to wpimath.
2021-06-13 16:38:05 -07:00
Starlight220
ef4ea84cb5 [commands] Change grouping decorator impl to flatten nested group structures (#3335) 2021-06-13 16:05:14 -07:00
Prateek Machiraju
b422665a3c [examples] Invert right side of drive subsystems (#3437)
The right motors of a DifferentialDrive are no longer automatically
inverted (#3340) so it needs to be done explicitly.
2021-06-13 15:43:16 -07:00
Thad House
186dadf14d [hal] Error if attempting to set DIO output on an input port (#3436) 2021-06-13 15:00:43 -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
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