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
8
#include "
okapi/api/control/controllerInput.hpp
"
9
#include <memory>
10
11
namespace
okapi
{
12
class
OffsetableControllerInput
:
public
ControllerInput
<double> {
13
public
:
19
explicit
OffsetableControllerInput
(
const
std::shared_ptr<
ControllerInput<double>
> &iinput);
20
21
virtual
~OffsetableControllerInput
();
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
okapi::ControllerInput
Definition
controllerInput.hpp:9
okapi::OffsetableControllerInput
Definition
offsettableControllerInput.hpp:12
okapi::OffsetableControllerInput::tarePosition
virtual void tarePosition()
Sets the "absolute" zero position of this controller input to its current position.
okapi::OffsetableControllerInput::input
std::shared_ptr< ControllerInput< double > > input
Definition
offsettableControllerInput.hpp:38
okapi::OffsetableControllerInput::offset
double offset
Definition
offsettableControllerInput.hpp:39
okapi::OffsetableControllerInput::~OffsetableControllerInput
virtual ~OffsetableControllerInput()
okapi::OffsetableControllerInput::OffsetableControllerInput
OffsetableControllerInput(const std::shared_ptr< ControllerInput< double > > &iinput)
A ControllerInput which can be tared to change the zero position.
okapi::OffsetableControllerInput::controllerGet
double controllerGet() override
Get the sensor value for use in a control loop.
controllerInput.hpp
okapi
Definition
chassisController.hpp:16
include
okapi
api
control
offsettableControllerInput.hpp
Generated by
1.9.8