项目:Lib2585
文件:Drivetrain.java
/**
* @param inputDeadzone joystick deadzone
* @param ramping ramping acceleration constant
* @param primaryEx primary rotation exponent
* @param secondEx secondary rotation exponent
* @param invertRotation boolean for inverting the rotate value
* @param drivebase robot drive object
*/
public Drivetrain(double inputDeadzone,double ramping,double primaryEx,double secondEx,boolean invertRotation,DifferentialDrive drivebase){
deadzone = inputDeadzone;
ramp = ramping;
//halve the rotation exponents since WPILib squares rotation by default
primaryRotationExponent = primaryEx / 2;
secondaryRotationExponent = secondEx / 2;
drivetrain = drivebase;
invertToggler = new Toggler(inverted);
rotationExponentToggler = new Toggler(usePrimaryRotationExponent);
this.invertRotation = invertRotation;
}
项目:Lib2585
文件:Drivetrain.java
/**Drivetrain with a deadzone of 0,no ramp,1 for the primary rotation exponent,1 for the secondary rotation exponent,and no inverted rotation
* @param drivetrain the RobotDrive object
*/
public Drivetrain(DifferentialDrive drivetrain) {
this(0,1,false,drivetrain);
}
项目:Lib2585
文件:Drivetrain.java
/**
* @return the drivetrain
*/
public DifferentialDrive getDrivetrain() {
return drivetrain;
}
项目:Lib2585
文件:Drivetrain.java
/**
* @param drivetrain the drivetrain to set
*/
public void setDrivetrain(DifferentialDrive drivetrain) {
this.drivetrain = drivetrain;
}
项目:Lib2585
文件:Drivetrain.java
/**Drivetrain with a deadzone of 0,no ramping,and no inverted rotation
* @param frontLeft the left front motor controller
* @param rearLeft the back left motor controller
* @param frontRight the front right motor controller
* @param rearRight the back right motor controller
*/
public Drivetrain(SpeedController frontLeft,SpeedController rearLeft,SpeedController frontRight,SpeedController rearRight) {
this(0,new DifferentialDrive(new SpeedControllerGroup(frontLeft,rearLeft),new SpeedControllerGroup(frontRight,rearRight)));
}
项目:Lib2585
文件:DrivetrainTest.java
/**
* @param inputDeadzone joystick deadzone
* @param ramping ramping acceleration constant
* @param primaryEx primary rotation exponent
* @param secondEx secondary rotation exponent
* @param invertRotation boolean for inverting the rotate value
* @param drivebase robot drive object
*/
public TestDrivetrain(double inputDeadzone,DifferentialDrive drivebase) {
super(inputDeadzone,ramping,primaryEx,secondEx,invertRotation,drivebase);
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。