LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
adiEncoder.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"
10
11namespace okapi {
13 public:
28 ADIEncoder(std::uint8_t iportTop, std::uint8_t iportBottom, bool ireversed = false);
29
46 ADIEncoder(std::tuple<std::uint8_t, std::uint8_t, std::uint8_t> iports, bool ireversed = false);
47
53 virtual double get() const override;
54
60 virtual std::int32_t reset() override;
61
68 virtual double controllerGet() override;
69
70 protected:
71 pros::c::ext_adi_encoder_t enc;
72};
73} // namespace okapi
PROS API header provides high-level user functionality.
virtual double controllerGet() override
Get the sensor value for use in a control loop.
ADIEncoder(std::tuple< std::uint8_t, std::uint8_t, std::uint8_t > iports, bool ireversed=false)
An encoder in an ADI port.
pros::c::ext_adi_encoder_t enc
virtual double get() const override
Get the current sensor value.
virtual std::int32_t reset() override
Reset the sensor to zero.
ADIEncoder(std::uint8_t iportTop, std::uint8_t iportBottom, bool ireversed=false)
An encoder in an ADI port.