C# Класс CSharpRoboticsLib.Drive.DriveHelper

Does all calculations for driving the robot split-arcade style. Contains an IEncoderDrive object. Does not handle shifting.
Показать файл Открыть проект

Открытые методы

Метод Описание
Drive ( double speed, double turn, bool isQuickTurn, bool isHighGear ) : void

Does all calculations and subroutines for driving the robot split-arcade style.

DriveHelper ( ITankDrive drive, double speedDeadzone, double turnDeadzone, double highNonLinearity, double lowNonLinearity, double highSensitivity, double lowSensitivity ) : System

Initializes a new DriveHelper

Приватные методы

Метод Описание
HandleDeadband ( double val, double deadband ) : double

Handles the deadband in the controllers. For Xbox controllers, the deadband on the joysticks is about 0.2

Описание методов

Drive() публичный Метод

Does all calculations and subroutines for driving the robot split-arcade style.
public Drive ( double speed, double turn, bool isQuickTurn, bool isHighGear ) : void
speed double Linear Control
turn double Rotational Control
isQuickTurn bool Allows less smooth, but faster turning. Will likely be turned on in low gear.
isHighGear bool Is the robot in High Gear? (requires different sensitivity values)
Результат void

DriveHelper() публичный Метод

Initializes a new DriveHelper
public DriveHelper ( ITankDrive drive, double speedDeadzone, double turnDeadzone, double highNonLinearity, double lowNonLinearity, double highSensitivity, double lowSensitivity ) : System
drive ITankDrive to control
speedDeadzone double deadband value for the speed axis
turnDeadzone double deadband value for the turn axis
highNonLinearity double Non-linearity for the turn input in high gear
lowNonLinearity double Non-linearity for the turn input in low gear
highSensitivity double turn sensitivity in high gear
lowSensitivity double turn sensitivity in low gear
Результат System