LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
iterativeController.hpp
Go to the documentation of this file.
1/*
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 */
6#pragma once
7
10
11namespace okapi {
18template <typename Input, typename Output>
19class IterativeController : public ClosedLoopController<Input, Output> {
20 public:
27 virtual Output step(Input ireading) = 0;
28
32 virtual Output getOutput() const = 0;
33
40 virtual void setOutputLimits(Output imax, Output imin) = 0;
41
49 virtual void setControllerSetTargetLimits(Output itargetMax, Output itargetMin) = 0;
50
56 virtual Output getMaxOutput() = 0;
57
63 virtual Output getMinOutput() = 0;
64
70 virtual void setSampleTime(QTime isampleTime) = 0;
71
77 virtual QTime getSampleTime() const = 0;
78};
79} // namespace okapi
An abstract closed-loop controller.
Closed-loop controller that steps iteratively using the step method below.
virtual Output getMaxOutput()=0
Get the upper output bound.
virtual QTime getSampleTime() const =0
Get the last set sample time.
virtual Output getMinOutput()=0
Get the lower output bound.
virtual Output step(Input ireading)=0
Do one iteration of the controller.
virtual void setControllerSetTargetLimits(Output itargetMax, Output itargetMin)=0
Sets the (soft) limits for the target range that controllerSet() scales into.
virtual Output getOutput() const =0
Returns the last calculated output of the controller.
virtual void setSampleTime(QTime isampleTime)=0
Set time between loops.
virtual void setOutputLimits(Output imax, Output imin)=0
Set controller output bounds.