20 const std::shared_ptr<AbstractMotor> &imotor,
29 double step(
double ireading)
override;
147 std::shared_ptr<AbstractMotor>
motor;
148 std::shared_ptr<IterativeVelocityController<double, double>>
controller;
double getOutput() const override
Returns the last calculated output of the controller.
void setControllerSetTargetLimits(double itargetMax, double itargetMin) override
Sets the (soft) limits for the target range that controllerSet() scales into.
std::shared_ptr< AbstractMotor > motor
void flipDisable() override
Changes whether the controller is off or on.
double getMinOutput() override
Get the lower output bound.
bool isDisabled() const override
Returns whether the controller is currently disabled.
double getTarget() override
Gets the last set target, or the default target if none was set.
void reset() override
Resets the controller's internal state so it is similar to when it was first initialized,...
double getMaxOutput() override
Get the upper output bound.
double getProcessValue() const override
void controllerSet(double ivalue) override
Writes the value of the controller output.
double step(double ireading) override
Do one iteration of the controller.
IterativeMotorVelocityController(const std::shared_ptr< AbstractMotor > &imotor, const std::shared_ptr< IterativeVelocityController< double, double > > &icontroller)
Velocity controller that automatically writes to the motor.
void setOutputLimits(double imax, double imin) override
Set controller output bounds.
std::shared_ptr< IterativeVelocityController< double, double > > controller
void flipDisable(bool iisDisabled) override
Sets whether the controller is off or on.
void setTarget(double itarget) override
Sets the target for the controller.
void setSampleTime(QTime isampleTime) override
Set time between loops in ms.
bool isSettled() override
Returns whether the controller has settled at the target.
QTime getSampleTime() const override
Get the last set sample time.
double getError() const override
Returns the last error of the controller.