LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
threeEncoderXDriveModel.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
10namespace okapi {
12 public:
25 ThreeEncoderXDriveModel(std::shared_ptr<AbstractMotor> itopLeftMotor,
26 std::shared_ptr<AbstractMotor> itopRightMotor,
27 std::shared_ptr<AbstractMotor> ibottomRightMotor,
28 std::shared_ptr<AbstractMotor> ibottomLeftMotor,
29 std::shared_ptr<ContinuousRotarySensor> ileftEnc,
30 std::shared_ptr<ContinuousRotarySensor> irightEnc,
31 std::shared_ptr<ContinuousRotarySensor> imiddleEnc,
32 double imaxVelocity,
33 double imaxVoltage);
34
40 std::valarray<std::int32_t> getSensorVals() const override;
41
45 void resetSensors() override;
46
47 protected:
48 std::shared_ptr<ContinuousRotarySensor> middleSensor;
49};
50} // namespace okapi
ThreeEncoderXDriveModel(std::shared_ptr< AbstractMotor > itopLeftMotor, std::shared_ptr< AbstractMotor > itopRightMotor, std::shared_ptr< AbstractMotor > ibottomRightMotor, std::shared_ptr< AbstractMotor > ibottomLeftMotor, std::shared_ptr< ContinuousRotarySensor > ileftEnc, std::shared_ptr< ContinuousRotarySensor > irightEnc, std::shared_ptr< ContinuousRotarySensor > imiddleEnc, double imaxVelocity, double imaxVoltage)
Model for an x drive (wheels at 45 deg from a skid steer drive).
void resetSensors() override
Reset the sensors to their zero point.
std::shared_ptr< ContinuousRotarySensor > middleSensor
std::valarray< std::int32_t > getSensorVals() const override
Read the sensors.