LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
integratedEncoder.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 "api.h"
11
12namespace okapi {
14 public:
21
28 IntegratedEncoder(std::int8_t iport, bool ireversed = false);
29
35 virtual double get() const override;
36
42 virtual std::int32_t reset() override;
43
50 virtual double controllerGet() override;
51
52 protected:
53 std::uint8_t port;
54 std::int8_t reversed{1};
55};
56} // namespace okapi
PROS API header provides high-level user functionality.
IntegratedEncoder(const okapi::Motor &imotor)
Integrated motor encoder.
virtual std::int32_t reset() override
Reset the sensor to zero.
virtual double controllerGet() override
Get the sensor value for use in a control loop.
IntegratedEncoder(std::int8_t iport, bool ireversed=false)
Integrated motor encoder.
virtual double get() const override
Get the current sensor value.