Home
Roadside
Carputer
geoHist
software
FRC
Blog
Now you can download a copy of these docs so you can use them offline!
Download now
Main Page
Related Pages
Classes
Files
File List
Commands
WaitUntilCommand.cpp
1
/*----------------------------------------------------------------------------*/
2
/* Copyright (c) FIRST 2011. All Rights Reserved. */
3
/* Open Source Software - may be modified and shared by FRC teams. The code */
4
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
5
/*----------------------------------------------------------------------------*/
6
7
#include "Commands/WaitUntilCommand.h"
8
#include "DriverStation.h"
9
#include "Timer.h"
10
17
WaitUntilCommand::WaitUntilCommand
(
double
time) :
18
Command
(
"WaitUntilCommand"
, time)
19
{
20
m_time = time;
21
}
22
23
WaitUntilCommand::WaitUntilCommand
(
const
char
*name,
double
time) :
24
Command
(name, time)
25
{
26
m_time = time;
27
}
28
29
void
WaitUntilCommand::Initialize
()
30
{
31
}
32
33
void
WaitUntilCommand::Execute
()
34
{
35
}
36
40
bool
WaitUntilCommand::IsFinished
()
41
{
42
return
DriverStation::GetInstance
()->
GetMatchTime
() >= m_time;
43
}
44
45
void
WaitUntilCommand::End
()
46
{
47
}
48
49
void
WaitUntilCommand::Interrupted
()
50
{
51
}
WaitUntilCommand::WaitUntilCommand
WaitUntilCommand(double time)
Definition:
WaitUntilCommand.cpp:17
WaitUntilCommand::Execute
virtual void Execute()
Definition:
WaitUntilCommand.cpp:33
WaitUntilCommand::IsFinished
virtual bool IsFinished()
Definition:
WaitUntilCommand.cpp:40
Command
Definition:
Command.h:43
DriverStation::GetInstance
static DriverStation * GetInstance()
Definition:
DriverStation.cpp:145
DriverStation::GetMatchTime
double GetMatchTime()
Definition:
DriverStation.cpp:492
WaitUntilCommand::End
virtual void End()
Definition:
WaitUntilCommand.cpp:45
WaitUntilCommand::Initialize
virtual void Initialize()
Definition:
WaitUntilCommand.cpp:29
WaitUntilCommand::Interrupted
virtual void Interrupted()
Definition:
WaitUntilCommand.cpp:49
Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by
1.8.6
© 2006-2009 Dustin Spicuzza. All rights reserved.
Powered by Onnac
I do not condone or encourage graffiti. Please paint responsibly.