C# 클래스 CSharpRoboticsLib.Drive.DriveHelper

Does all calculations for driving the robot split-arcade style. Contains an IEncoderDrive object. Does not handle shifting.
파일 보기 프로젝트 열기: shockwave4488/CSharpRoboticsLib

공개 메소드들

메소드 설명
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