Change C++ WaitCommand to use units (#1865)

Also remove unique_ptr usage.
This commit is contained in:
Peter Johnson
2019-09-02 23:39:51 -07:00
committed by GitHub
parent 1fb3011235
commit 761bc3ef85
10 changed files with 27 additions and 25 deletions

View File

@@ -14,6 +14,7 @@
#include <memory>
#include <string>
#include <units/units.h>
#include <wpi/ArrayRef.h>
#include <wpi/Demangle.h>
#include <wpi/SmallSet.h>
@@ -103,10 +104,10 @@ class Command : public frc::ErrorBase {
* interrupted and un-scheduled. Note that the timeout only applies to the
* command returned by this method; the calling command is not itself changed.
*
* @param seconds the timeout duration
* @param duration the timeout duration
* @return the command with the timeout added
*/
ParallelRaceGroup WithTimeout(double seconds) &&;
ParallelRaceGroup WithTimeout(units::second_t duration) &&;
/**
* Decorates this command with an interrupt condition. If the specified