Commit Graph

22 Commits

Author SHA1 Message Date
Peter Johnson
aee4603269 clang-tidy: modernize-pass-by-value 2020-12-29 14:26:19 -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
Tyler Veness
96e26247d7 [wpiutil] Add custom priority queue implementation (#2770)
This returns the removed object from pop() to avoid copies.
2020-10-04 12:49:23 -07:00
Tyler Veness
9a63cd36cd [wpilibc] Const-qualify Watchdog comparison operator (#2767) 2020-10-03 08:36:51 -07:00
Peter Johnson
23ba3ca19e [wpilib] Change Watchdog to use HAL notifier (#2602)
This makes it follow simulation timing instead of wall clock time.
2020-07-21 22:58:16 -07:00
Starlight220
27f9a21a2c [wpilib] Moved Watchdog output to reportWarning() (#2413) 2020-05-20 20:57:06 -07:00
Prateek Machiraju
b9ee3ae030 [wpilibc] Refactor Tracer functionality out of Watchdog class (#2456) 2020-04-01 20:10:28 -07:00
Tyler Veness
4228d3609e Fix Watchdog epoch prints being off by three orders of magnitude (#2414)
This was caused by m_epochs storing the timestamps as nanoseconds while
the epoch printing code expects microseconds. Adding a duration cast
fixes this.

Java stores the epoch timestamps in a double as microseconds, so it
doesn't exhibit this bug. The comments were updated to make this more
obvious.

Fixes #2392.
2020-03-15 19:56:08 -07:00
Tyler Veness
7112add67f Watchdog: use units::second_t instead of double (#1863)
Fixes #1827.
2019-09-03 15:58:31 -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
f432f65bef Update copyright year in license to 2019 (#1524)
Also update clang-format to 6.0.
2019-05-17 17:35:09 -07:00
Sam Carlberg
e8b24717c7 C++ Shuffleboard fixes (#1595)
* Fix C++ ShuffleboardComponent template type

* Fix `WithWidget(WidgetType&)`not being properly capitalized

* Fix data members across dll boundaries by using enum for built in types
2019-02-14 20:44:30 -08:00
Tyler Veness
43696956d2 Fix Watchdog incorrectly resetting expiration flag upon disable (#1580)
Resetting the flag should only occur in Enable() and Reset().
IterativeRobotBase needs the flag to remain set to print epochs after
disabling the Watchdog.
2019-02-02 00:22:07 -08:00
Tyler Veness
f121ccff0d Avoid Watchdog thread clobbering m_isExpired flag after callback (#1527) 2019-01-08 19:37:59 -08:00
Peter Johnson
a2368a6199 Watchdog: add timeout message suppression feature
Was part of reverted #1486
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
Tyler Veness
41596608cc Suppress Watchdog's generic timeout message in MotorSafety (#1486) 2018-12-14 10:53:33 -08:00
Tyler Veness
6d4326a560 Rate-limit Watchdog timeout prints to 1Hz (#1459) 2018-12-07 19:39:02 -08:00
Tyler Veness
3b33abfc7b Make Watchdog use single thread dispatch (#1347)
Notifier has one thread per instance because the callbacks must be
asynchronous. Watchdog callbacks can be synchronous, so this overhead
can be done away with via a scheduler thread akin to what the HAL
Notifier does.
2018-12-01 00:05:33 -08:00
Tyler Veness
d89b7dd412 Move CameraServer and WPILib headers into their own folder
The old headers were moved into folders because doing so avoids polluting
the system include directories.

Folder names were also normalized to lowercase.
2018-07-22 19:40:57 -07:00
Tyler Veness
a818c7fd47 Add loop timing to IterativeRobot and TimedRobot (#781) 2018-06-24 00:29:21 -07:00