コード例 #1
0
void SlavedLauncherPID::SendSD() {
	SmartDashboard::PutNumber(GetName() + "speed", ReturnPIDInput());
	SmartDashboard::PutNumber(GetName() + "power", pidMotor.Get());
	SmartDashboard::PutNumber(GetName() + "power2", pidMotor2.Get());
	Command* comm = GetCurrentCommand();
	if(comm)
	{
		SmartDashboard::PutString(GetName() + "command" , comm->GetName());
	}
}
コード例 #2
0
ファイル: Arm.cpp プロジェクト: sraemorr/ThisWorks
void Arm::Drive(float speed) {

	// hold our position if PID is not enabled
	// else we want to know where we are and lock there
	// when we get out of override
	setPoint = isEnabled ? setPoint : ReturnPIDInput();

	// Cap the values at 1 so nothing strange happens
	if (speed > .5)
	{
		speed = .5;
	}

	// Limit lower values as well
	if (speed < -.3)
	{
		speed = -.3;
	}

	aRM_MOTOR_1->Set((float)speed);
	aRM_MOTOR_2->Set((float)speed);
}
コード例 #3
0
ファイル: PIDCommand.cpp プロジェクト: 128keaton/wpilib
double PIDCommand::GetPosition()
{
	return ReturnPIDInput();
}
コード例 #4
0
ファイル: PIDCommand.cpp プロジェクト: 128keaton/wpilib
double PIDCommand::PIDGet()
{
	return ReturnPIDInput();
}
コード例 #5
0
double SmartMotor::PIDGet(){
	return ReturnPIDInput();
}
コード例 #6
0
double PIDSubsystem::PIDGet() { return ReturnPIDInput(); }
コード例 #7
0
/**
 * Returns the current rate.
 *
 * @return the current rate
 */
double PIDSubsystem::GetRate() { return ReturnPIDInput(); }
コード例 #8
0
/**
 * Returns the current position.
 *
 * @return the current position
 */
double PIDSubsystem::GetPosition() { return ReturnPIDInput(); }