void DriveStraight::End() {
	double l=Robot::drivetrain->GetLeftDistance();
	double r=Robot::drivetrain->GetRightDistance();
	double h=Robot::drivetrain->GetHeading();
	std::cout << TimeSinceInitialized()<< "  DriveStraight End("<<l<<","<<r<<","<<h<<")"<<std::endl;
	Acntrl.End();
	Dcntrl.End();
	Robot::drivetrain->EndTravel();
}
// Make this return true when this Command no longer needs to run execute()
bool ShooterLoadCommand::IsFinished() 
{
	if(TimeSinceInitialized() > 0.5)
	{
		Robot::shooter->LoaderUndeploy();
		return true;
	}
	return false;
}
Beispiel #3
0
// Make this return true when this Command no longer needs to run execute()
bool Move::IsFinished() {
    if(seconds -TimeSinceInitialized() <= 0)
    {
        return true;
    }
    else
    {
        return false;
    }
}
// Make this return true when this Command no longer needs to run execute()
bool DriveDirectionCommand::IsFinished() 
{
	return (TimeSinceInitialized() >= m_time);
}
void ExecHolder::SetDeltaTimeout(double t) {
	elapsed_time=TimeSinceInitialized();
	timing=true;
	SetTimeout(elapsed_time+t);
}
Beispiel #6
0
void Turn::End() {
	double h=Robot::drivetrain->GetHeading();
	std::cout << TimeSinceInitialized()<< "  Turn End("<<h<<")"<<std::endl;
	pid.Disable();
	Robot::drivetrain->EndTravel();
}
// Make this return true when this Command no longer needs to run execute()
bool CalibrateTurret::IsFinished() 
{
	return (TimeSinceInitialized() > 2);
}
Beispiel #8
0
/**
 * Returns whether or not the {@link Command#timeSinceInitialized() timeSinceInitialized()}
 * method returns a number which is greater than or equal to the timeout for the command.
 * If there is no timeout, this will always return false.
 * @return whether the time has expired
 */
bool Command::IsTimedOut()
{
	return m_timeout != -1 && TimeSinceInitialized() >= m_timeout;
}
Beispiel #9
0
// Make this return true when this Command no longer needs to run execute()
bool BallToIntakeCmd::IsFinished()
{

	return TimeSinceInitialized() > 1.75;
}
// Called repeatedly when this Command is scheduled to run
void FireDisc::Execute() {
	if(TimeSinceInitialized() < .7)
		Robot::fire->Forward();
	else
		Robot::fire->Backward();
}