LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
offsettableControllerInput.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
9#include <memory>
10
11namespace okapi {
13 public:
19 explicit OffsetableControllerInput(const std::shared_ptr<ControllerInput<double>> &iinput);
20
22
29 double controllerGet() override;
30
35 virtual void tarePosition();
36
37 protected:
38 std::shared_ptr<ControllerInput<double>> input;
39 double offset{0};
40};
41} // namespace okapi
virtual void tarePosition()
Sets the "absolute" zero position of this controller input to its current position.
std::shared_ptr< ControllerInput< double > > input
OffsetableControllerInput(const std::shared_ptr< ControllerInput< double > > &iinput)
A ControllerInput which can be tared to change the zero position.
double controllerGet() override
Get the sensor value for use in a control loop.