Now you can download a copy of these docs so you can use them offline! Download now
WaitUntilCommand.cpp
00001 /*----------------------------------------------------------------------------*/ 00002 /* Copyright (c) FIRST 2011. All Rights Reserved. */ 00003 /* Open Source Software - may be modified and shared by FRC teams. The code */ 00004 /* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */ 00005 /*----------------------------------------------------------------------------*/ 00006 00007 #include "Commands/WaitUntilCommand.h" 00008 #include "DriverStation.h" 00009 #include "Timer.h" 00010 00017 WaitUntilCommand::WaitUntilCommand(double time) : 00018 Command("WaitUntilCommand", time) 00019 { 00020 m_time = time; 00021 } 00022 00023 WaitUntilCommand::WaitUntilCommand(const char *name, double time) : 00024 Command(name, time) 00025 { 00026 m_time = time; 00027 } 00028 00029 void WaitUntilCommand::Initialize() 00030 { 00031 } 00032 00033 void WaitUntilCommand::Execute() 00034 { 00035 } 00036 00040 bool WaitUntilCommand::IsFinished() 00041 { 00042 return DriverStation::GetInstance()->GetMatchTime() >= m_time; 00043 } 00044 00045 void WaitUntilCommand::End() 00046 { 00047 } 00048 00049 void WaitUntilCommand::Interrupted() 00050 { 00051 }
Generated on Thu Jan 12 2012 22:35:25 for WPILibC++ by
1.7.1