Peter Johnson
831c10bdfc
[wpilibc] Errors: Use fmtlib
2021-05-25 10:04:32 -07:00
Peter Johnson
8d961dfd25
[wpilibc] Remove ErrorBase ( #3306 )
...
Replace with new exception-based error reporting, consistent with Java.
This also builds stacktraces into the reporting/exceptions.
2021-04-18 20:35:29 -07: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
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
Tyler Veness
e582518bae
Fix some move constructors ( #1754 )
...
Timer didn't have working move semantics because mutexes aren't
moveable, meaning the default implementations were ill-formed.
MotorSafety wasn't locking its mutex.
2019-07-07 19:15:59 -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
Peter Johnson
bc2c932f92
Fix MotorSafety deadlock ( #1526 )
...
Some instances of StopMotor (most notably DifferentialDrive) call Feed(),
which deadlocks due to Check() holding the same lock.
Fixes #1525 .
2019-01-02 20:58:39 -08:00
Peter Johnson
f0f196e5b3
Revert "MotorSafety: Use Watchdog instead of DS class polling ( #1442 )"
...
This reverts commit 26e8e587f9 .
2018-12-30 00:16:50 -08:00
Peter Johnson
7c35355d29
Revert "Suppress Watchdog's generic timeout message in MotorSafety ( #1486 )"
...
This reverts commit 41596608cc .
2018-12-30 00:16:50 -08:00
Peter Johnson
75cc09a9e4
Revert "Suppress timeout message in C++ MotorSafety class ( #1512 )"
...
This reverts commit 300eeb330d .
2018-12-30 00:16:50 -08:00
Tyler Veness
300eeb330d
Suppress timeout message in C++ MotorSafety class ( #1512 )
...
wpilibj's default constructor is already correct.
2018-12-27 14:01:02 -06:00
Tyler Veness
41596608cc
Suppress Watchdog's generic timeout message in MotorSafety ( #1486 )
2018-12-14 10:53:33 -08:00
Tyler Veness
26e8e587f9
MotorSafety: Use Watchdog instead of DS class polling ( #1442 )
2018-12-01 01:34:52 -08:00
Tyler Veness
acb786a791
Remove MotorSafetyHelper, create MotorSafety base class instead ( #562 )
...
Most of the MotorSafety implementation was moved into the MotorSafety base
class. SafePWM's inheritance of MotorSafety was moved into PWM to
eliminate Java needing a helper class.
In Java, a helper class for Sendable (SendableImpl) was added due to
lack of multiple inheritance.
2018-11-22 21:15:26 -08:00