Brian Silverman | 26e4e52 | 2015-12-17 01:56:40 -0500 | [diff] [blame^] | 1 | /*----------------------------------------------------------------------------*/ |
| 2 | /* Copyright (c) FIRST 2011. All Rights Reserved. |
| 3 | */ |
| 4 | /* Open Source Software - may be modified and shared by FRC teams. The code */ |
| 5 | /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */ |
| 6 | /*----------------------------------------------------------------------------*/ |
| 7 | |
| 8 | #include "Commands/WaitCommand.h" |
| 9 | #include <sstream> |
| 10 | |
| 11 | WaitCommand::WaitCommand(double timeout) |
| 12 | : Command( |
| 13 | ((std::stringstream &)(std::stringstream("Wait(") << timeout << ")")) |
| 14 | .str() |
| 15 | .c_str(), |
| 16 | timeout) {} |
| 17 | |
| 18 | WaitCommand::WaitCommand(const std::string &name, double timeout) |
| 19 | : Command(name, timeout) {} |
| 20 | |
| 21 | void WaitCommand::Initialize() {} |
| 22 | |
| 23 | void WaitCommand::Execute() {} |
| 24 | |
| 25 | bool WaitCommand::IsFinished() { return IsTimedOut(); } |
| 26 | |
| 27 | void WaitCommand::End() {} |
| 28 | |
| 29 | void WaitCommand::Interrupted() {} |