33 std::int32_t imaxVelocity,
130 std::shared_ptr<AbstractMotor>
motor;
Closed-loop controller that uses the V5 motor's onboard control to move.
virtual void stop()
Stops the motor mid-movement.
virtual void resumeMovement()
Resumes moving after the controller is reset.
bool isSettled() override
Returns whether the controller has settled at the target.
std::unique_ptr< SettledUtil > settledUtil
void reset() override
Resets the controller's internal state so it is similar to when it was first initialized,...
void tarePosition() override
Sets the "absolute" zero position of the controller to its current position.
AsyncPosIntegratedController(const std::shared_ptr< AbstractMotor > &imotor, const AbstractMotor::GearsetRatioPair &ipair, std::int32_t imaxVelocity, const TimeUtil &itimeUtil, const std::shared_ptr< Logger > &ilogger=Logger::getDefaultLogger())
Closed-loop controller that uses the V5 motor's onboard control to move.
void flipDisable(bool iisDisabled) override
Sets whether the controller is off or on.
double getProcessValue() const override
std::shared_ptr< AbstractMotor > motor
AbstractMotor::GearsetRatioPair pair
double getError() const override
Returns the last error of the controller.
void setMaxVelocity(std::int32_t imaxVelocity) override
Sets a new maximum velocity in motor RPM [0-600].
bool isDisabled() const override
Returns whether the controller is currently disabled.
std::shared_ptr< Logger > logger
double getTarget() override
Gets the last set target, or the default target if none was set.
void flipDisable() override
Changes whether the controller is off or on.
void waitUntilSettled() override
Blocks the current task until the controller has settled.
void controllerSet(double ivalue) override
Writes the value of the controller output.
void setTarget(double itarget) override
Sets the target for the controller.
bool controllerIsDisabled
static std::shared_ptr< Logger > getDefaultLogger()
Utility class for holding an AbstractTimer, AbstractRate, and SettledUtil together in one class since...
A simple structure representing the full ratio between motor and wheel.