com.flash3388.flashlib.robot.systems.actions.Rotate Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of flashlib.robot.systems Show documentation
Show all versions of flashlib.robot.systems Show documentation
Robotics development framework (flashlib.robot.systems)
package com.flash3388.flashlib.robot.systems.actions;
import com.flash3388.flashlib.robot.motion.Rotatable;
import com.flash3388.flashlib.scheduling.ActionControl;
import com.flash3388.flashlib.scheduling.FinishReason;
import com.flash3388.flashlib.scheduling.actions.ActionBase;
import java.util.function.DoubleSupplier;
public class Rotate extends ActionBase {
private final Rotatable mRotatable;
private final DoubleSupplier mSpeed;
public Rotate(Rotatable rotatable, DoubleSupplier speed) {
mRotatable = rotatable;
mSpeed = speed;
}
@Override
public void initialize(ActionControl control) {
}
@Override
public void execute(ActionControl control) {
mRotatable.rotate(mSpeed.getAsDouble());
}
@Override
public void end(FinishReason reason) {
mRotatable.stop();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy