C# Class CSharpRoboticsLib.Drive.DriveHelper

Does all calculations for driving the robot split-arcade style. Contains an IEncoderDrive object. Does not handle shifting.
Afficher le fichier Open project: shockwave4488/CSharpRoboticsLib

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
HandleDeadband ( double val, double deadband ) : double

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

Method Details

Drive() public méthode

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)
Résultat void

DriveHelper() public méthode

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
Résultat System