LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
adiMotor.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 {
13class ADIMotor : public ControllerOutput<double> {
14 public:
27 ADIMotor(std::uint8_t iport,
28 bool ireverse = false,
29 const std::shared_ptr<Logger> &logger = Logger::getDefaultLogger());
30
45 ADIMotor(std::pair<std::uint8_t, std::uint8_t> iports,
46 bool ireverse = false,
47 const std::shared_ptr<Logger> &logger = Logger::getDefaultLogger());
48
54 virtual void moveVoltage(std::int8_t ivoltage) const;
55
62 void controllerSet(double ivalue) override;
63
64 protected:
65 std::uint8_t smartPort;
66 std::uint8_t port;
67 std::int8_t reversed;
68};
69} // namespace okapi
PROS API header provides high-level user functionality.
ADIMotor(std::uint8_t iport, bool ireverse=false, const std::shared_ptr< Logger > &logger=Logger::getDefaultLogger())
A motor in an ADI port.
virtual void moveVoltage(std::int8_t ivoltage) const
Set the voltage to the motor.
std::uint8_t port
Definition adiMotor.hpp:66
ADIMotor(std::pair< std::uint8_t, std::uint8_t > iports, bool ireverse=false, const std::shared_ptr< Logger > &logger=Logger::getDefaultLogger())
A motor in an ADI port.
void controllerSet(double ivalue) override
Writes the value of the controller output.
std::int8_t reversed
Definition adiMotor.hpp:67
std::uint8_t smartPort
Definition adiMotor.hpp:65
static std::shared_ptr< Logger > getDefaultLogger()