Eric
17cae787e7
[commands] Mark CommandPtr class as [[nodiscard]] ( #7803 )
...
This has the same effect but makes it so any user code returning CommandPtr can't discard a returned command.
Signed-off-by: Eric Ward <ezeward4@gmail.com >
2025-05-03 20:44:55 -07:00
ハイドラント
78b6d61e88
[commands] Use factories and decorators in Command tests ( #7006 )
2024-12-29 10:45:17 -06:00
Kaya
807dffed35
[commands] Fix C++ iterator invalidation bug ( #7554 )
...
Co-authored-by: Joseph Eng <91924258+KangarooKoala@users.noreply.github.com >
Co-authored-by: Ryan Blue <13878527+rzblue@users.noreply.github.com >
2024-12-20 00:32:24 -06:00
Daniel Chen
68285dae77
[commands] Add withDeadline modifier ( #7299 )
...
Co-authored-by: Ryan Blue <ryanzblue@gmail.com >
2024-12-13 18:30:02 -07:00
Tyler Veness
a04c40f589
Replace std::make_pair with std::pair CTAD ( #7405 )
2024-11-17 20:29:23 -08:00
Ryan Blue
5f3cf517d3
[commands] C++: Allow CommandPtrs to be owned by the scheduler ( #7310 )
...
Previously users would have to keep track of dynamically created CommandPtrs. This adds an ownership-taking version of schedule which places the command in a temporary store in the scheduler. The command will be freed when the command's lifecycle ends.
2024-10-31 22:03:12 -07:00
Tyler Veness
554024767e
Fix errors from new cpplint.py ( #7105 )
2024-09-20 17:43:39 -07:00
Tyler Veness
8e0d9ac805
Clean up unit UDL usage ( #6961 )
2024-08-14 10:44:00 -07:00
Wispy
5a1417aeb9
[commands] Add Trigger.onChange() test ( #6849 )
2024-07-27 16:29:22 -07:00
Joseph Eng
1828fdaaa4
[commands] Define order of parallel groups ( #6602 )
2024-06-01 12:01:15 -07:00
Joseph Eng
5c5e5af0c6
[commands] Add missing C++ decorators ( #6599 )
2024-05-24 13:14:15 -07:00
Drew Williams
0afc35f336
[commands] Fix C++ SysIdRoutine crashing when passed nullptr or {} ( #6508 )
...
Flattens parameter from a `std::optional<std::function<...>>` to just a `std::function<...>`. This is a breaking change but a trivial one for teams to fix.
2024-05-01 09:09:15 -07:00
Isaac Turner
5edc652c05
[commands] Fix multiple C++ warnings ( #6546 )
2024-04-27 21:07:50 -07:00
Tyler Veness
5370f249a1
[build] Upgrade to wpiformat 2024.33 ( #6449 )
...
This upgrades to clang-format and clang-tidy 18.1.1. This has the
constructor attribute formatting fix, so we can remove our
WPI_DEPRECATED macro.
2024-03-18 23:11:20 -07:00
Thad House
63d9e945b8
[hal] HAL_RefreshDSData: Zero out control word on DS disconnect, use cache in sim ( #6380 )
2024-02-18 14:30:40 -08:00
Eli Barnett
707cb06105
[wpilib] Add SysIdRoutine logging utility and command factory ( #6033 )
...
Co-authored-by: Drew Williams <williams.r.drew@gmail.com >
Co-authored-by: Peter Johnson <johnson.peter@gmail.com >
Co-authored-by: Tyler Veness <calcmogul@gmail.com >
2024-01-05 11:50:23 -08:00
Starlight220
5172ab8fd0
[commands] C++ CommandPtr: Prevent null initialization ( #5991 )
2023-12-02 16:45:04 -08:00
DeltaDizzy
09f3ed6a5f
[commands] Add static Trigger factories for robot mode changes ( #5902 )
2023-11-14 15:54:43 -08:00
Tyler Veness
c1a57e422a
[commands] Clean up make_vector.h ( #5917 )
2023-11-12 20:23:34 -08:00
Ryan Blue
c87f8fd538
[commands] Add DeferredCommand ( #5566 )
...
Allows commands to be constructed at runtime without proxying.
2023-10-26 19:16:33 -07:00
Gold856
ff1849052e
[commands] Make command scheduling order consistent ( #5470 )
2023-10-09 23:52:26 -07:00
Ryan Blue
fef03a3ff5
[commands] Clean up C++ includes after Requirements was added ( #5719 )
2023-10-04 22:09:28 -07:00
Joseph Eng
633c5a8a22
[commands] Add C++ Requirements struct ( #5504 )
2023-09-17 20:48:39 -07:00
Joseph Eng
b265a68eea
[commands] Add interruptor parameter to onCommandInterrupt callbacks ( #5461 )
2023-09-17 20:47:37 -07:00
Tyler Veness
4bac4dd0f4
[wpimath] Move PIDController from frc2 to frc namespace ( #5640 )
...
The old PIDController class in the frc namespace was removed for the
2023 season.
2023-09-15 19:57:31 -07:00
Ryan Blue
3b79cb6ed3
[commands] Revert SubsystemBase deprecation/removal ( #5634 )
2023-09-14 20:56:48 -07:00
Ryan Blue
36d514eae7
[commands] Refactor C++ ScheduleCommand to use SmallSet ( #5568 )
...
Remove SetUtilities.h
2023-08-29 13:16:15 -07:00
Tyler Veness
8e2a7fd306
Include thirdparty libraries with angle brackets ( #5578 )
2023-08-28 15:13:34 -07:00
Gold856
99b88be4f3
[wpilib] Reduce usage of NTSendable ( #5434 )
2023-07-23 21:34:49 -07:00
Tyler Veness
1af224c21b
Add missing <functional> includes ( #5459 )
2023-07-18 21:18:32 -07:00
Ryan Blue
aaea85ff16
[commands] Merge CommandBase into Command and SubsystemBase into Subsystem ( #5392 )
...
Moves all CommandBase functionality into Command and deprecates CommandBase for removal.
Moves all SubsystemBase functionality into Subsystem and deprecates SubsystemBase for removal.
Adds a function to CommandScheduler to remove all registered Subsystems.
2023-07-13 22:12:01 -07:00
Ryan Blue
7a099cb02a
[commands] Remove deprecated classes and functions ( #5409 )
...
Removes:
- PerpetualCommand
- Command.perpetually()
- CommandGroupBase
- Command.IsGrouped() (C++ only)
- Command.SetGrouped() (C++ only)
- Command.withInterrupt()
- ProxyScheduleCommand
- Button
- InternalButton, JoystickButton, NetworkButton and POVButton now subclass Trigger
- Old style Trigger functions:
- Trigger.whenActive
- Trigger.whileActiveOnce
- Trigger.whileActiveContinuous
- Trigger.whenInactive
- Trigger.toggleWhenActive
- Trigger.cancelWhenActive
- CommandScheduler.clearButtons()
- CommandScheduler.addButtons() (Java only)
- Command supplier constructor of SelectCommand
2023-07-10 09:56:18 -07:00
Starlight220
c4fc21838f
[commands] Add ConditionalCommand getInterruptionBehavior ( #5161 )
2023-06-23 08:21:05 -07:00
Starlight220
89fc51f0d4
Add tests for SendableChooser and Command Sendable functionality ( #5179 )
2023-06-23 08:18:38 -07:00
Ryan Blue
ebae341a91
[commands] Add test for subsystem registration and periodic ( #5408 )
2023-06-20 20:29:59 -07:00
Tyler Veness
5d3a133f9f
Remove spaces in NOLINT comments ( #5407 )
...
clang-tidy ignores the category filter if there's a space. wpiformat now
ignores categories it doesn't understand, so we can remove the spaces.
2023-06-20 20:29:23 -07:00
Tyler Veness
1501607e48
[commands] Fix clang-tidy warnings ( #5402 )
2023-06-19 23:01:46 -07:00
Joseph Eng
316cd2a453
[commands] Notify DriverStationSim in CommandTestBaseWithParam ( #5400 )
2023-06-19 22:56:56 -07:00
Tyler Veness
59905ea721
Replace WPI_DEPRECATED() macro with [[deprecated]] attribute ( #5373 )
...
Continue to use WPI_DEPRECATED macro for constructors until clang-format is fixed.
2023-06-08 00:01:06 -07:00
Tyler Veness
91cbcea841
Replace SFINAE with concepts ( #5361 )
...
Concepts are cleaner to use and result in much better error messages for incorrect template use.
2023-06-07 09:50:09 -07:00
Joseph Eng
ee3b4621e5
[commands] Add onlyWhile and onlyIf ( #5291 )
2023-04-30 14:09:02 -07:00
Joseph Eng
40ca094686
[commands] Fix RepeatCommand calling end() twice ( #5261 )
2023-04-28 20:57:33 -07:00
Sriman Achanta
f75acd11ce
[commands] Use Timer.restart() ( #5023 )
2023-01-29 07:21:07 -08:00
Starlight220
0d105ab771
[commands] Deduplicate command test utils ( #4897 )
2023-01-08 07:44:53 -08:00
Griffin Della Grotte
1cbebaa2f7
[commands] Remove final semicolon from test macro definition ( #4859 )
2022-12-26 00:14:59 -06:00
Peter Johnson
ffbf6a1fa2
[commands] Disable regularly failing unit test ( #4824 )
2022-12-15 21:53:08 -08:00
Starlight220
fbabd0ef15
[commands] Enhance Command Sendable implementations ( #4822 )
2022-12-15 18:28:52 -08:00
Starlight220
61c75deb2a
[commands] Test no-op behavior of scheduling a scheduled command ( #4806 )
2022-12-12 20:29:47 -08:00
Starlight220
4bbdbdfb48
[commands] Move GroupedCommands to CommandScheduler ( #4728 )
...
Move the command group checking functionality from CommandGroupBase into CommandScheduler.
Update references to grouping as composition for clarity (because explicitly grouping isn't the only way to do it).
Deprecate the static factory methods parallel, race, and deadline in CommandGroupBase in favor of the identical ones in Commands.
2022-12-06 21:13:31 -08:00
Starlight220
70080457d5
[commands] Refactor ProxyScheduleCommand, SelectCommand into ProxyCommand ( #4534 )
2022-11-28 14:43:10 -08:00