本文整理汇总了Java中edu.wpi.first.wpilibj.CANJaguar.configNeutralMode方法的典型用法代码示例。如果您正苦于以下问题:Java CANJaguar.configNeutralMode方法的具体用法?Java CANJaguar.configNeutralMode怎么用?Java CANJaguar.configNeutralMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.wpi.first.wpilibj.CANJaguar
的用法示例。
在下文中一共展示了CANJaguar.configNeutralMode方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SlingShot
import edu.wpi.first.wpilibj.CANJaguar; //导入方法依赖的package包/类
public SlingShot()
{
try
{
shooterPull = new CANJaguar(ReboundRumble.SHOOTER_PULL_CAN_ID);
shooterPull.changeControlMode(CANJaguar.ControlMode.kPercentVbus);
shooterPull.configNeutralMode(CANJaguar.NeutralMode.kBrake);
elevation = new CANJaguar(ReboundRumble.ELEVATION_CAN_ID);
SetElevationPositionControl();
} catch (CANTimeoutException ex)
{
}
trigger = new Relay(ReboundRumble.SHOOTER_TRIGGER_RELAY_CHANNEL);
// loadPosition = new DigitalInput(ReboundRumble.LOAD_POSITON_LIMIT_SWITCH);
// slingMagnet = new Relay(ReboundRumble.SLING_ELECTROMAGNET_RELAY_CHANNEL);
// ballSensor = new DigitalInput(ReboundRumble.SHOOTER_BALL_SENSOR_GPIO_CHANNEL);
settingForce = false;
}
示例2: ShooterRotator
import edu.wpi.first.wpilibj.CANJaguar; //导入方法依赖的package包/类
private ShooterRotator()
{
pot = new ShooterPotentiometer(2);
SmartDashboard.putNumber("Shooter Rotate Distance", 0);
try
{
rotationJag = new CANJaguar(RobotMap.SHOOTER_ROTATION_JAG);
rotationJag.configNeutralMode(CANJaguar.NeutralMode.kBrake);
}
catch (CANTimeoutException ex)
{
reportCANException(ex);
}
}
示例3: canInit
import edu.wpi.first.wpilibj.CANJaguar; //导入方法依赖的package包/类
public final void canInit() throws CANTimeoutException {
leftJag = new CANJaguar(4,CANJaguar.ControlMode.kPercentVbus);
leftJag.setVoltageRampRate(524);
leftJag.configNeutralMode(CANJaguar.NeutralMode.kCoast);
rightJag = new CANJaguar(3, CANJaguar.ControlMode.kPercentVbus);
rightJag.setVoltageRampRate(524);
leftJag.configNeutralMode(CANJaguar.NeutralMode.kCoast);
}
示例4: SteeringUnit
import edu.wpi.first.wpilibj.CANJaguar; //导入方法依赖的package包/类
SteeringUnit(int steeringCanID, int leftCanID, int rightCanID) throws CANTimeoutException {
middle = new CANJaguar(steeringCanID, CANJaguar.ControlMode.kPosition);
//middle = new CANJaguar(steeringCanID, CANJaguar.ControlMode.kPercentVbus);
middle.configMaxOutputVoltage(ReboundRumble.MAX_MOTOR_VOLTAGE);
middle.configPotentiometerTurns(1);
middle.setPositionReference(CANJaguar.PositionReference.kPotentiometer);
middle.configNeutralMode(CANJaguar.NeutralMode.kBrake);
middle.setPID(kProportional, kIntegral, kDifferential);
left = new Wheel(leftCanID);
right = new Wheel(rightCanID);
setpoint = 0.0;
}
示例5: Shooter
import edu.wpi.first.wpilibj.CANJaguar; //导入方法依赖的package包/类
public Shooter() throws CANTimeoutException {
motor = new CANJaguar(Parameters.WheelOneCANJaguarCANID, CANJaguar.ControlMode.kPercentVbus);
motor.configMaxOutputVoltage(Parameters.MaxMotorOutputVoltage);
motor.configNeutralMode(CANJaguar.NeutralMode.kBrake);
discSensor = new DigitalInput(Parameters.DiscInShooterGPIOChannel);
shooterCockedSensor = new DigitalInput(Parameters.ShooterIsCockedGPIOChannel);
shooterRetractedSensor = new DigitalInput(Parameters.ShooterIsRetractedGPIOChannel);
}
示例6: Arm
import edu.wpi.first.wpilibj.CANJaguar; //导入方法依赖的package包/类
public Arm(int armCANID) {
// latchSwitch = new DigitalInput(1,
// Parameters.latchLimitSwitchGPIOChannel);
// handOffSwitch = new DigitalInput(1
// , Parameters.handOffLimitSwitchGPIOChannel);
try {
motor = new CANJaguar(armCANID);
motor.configMaxOutputVoltage(Parameters.MaxMotorOutputVoltage);
motor.changeControlMode(CANJaguar.ControlMode.kPercentVbus);
motor.configNeutralMode(CANJaguar.NeutralMode.kBrake);
} catch (CANTimeoutException ex) {
ex.printStackTrace();
}
}
示例7: Wheel
import edu.wpi.first.wpilibj.CANJaguar; //导入方法依赖的package包/类
Wheel(int canId) throws CANTimeoutException {
motorController = new CANJaguar(canId);
motorController.configMaxOutputVoltage(ReboundRumble.MAX_MOTOR_VOLTAGE);
motorController.changeControlMode(CANJaguar.ControlMode.kVoltage);
motorController.configNeutralMode(CANJaguar.NeutralMode.kBrake);
}
示例8: Tread
import edu.wpi.first.wpilibj.CANJaguar; //导入方法依赖的package包/类
/**
* Tread
*
* Constructor
*
* @param parent - TankDrive that this Tread is part of
* @param canID - The channel number for the CANJaguar
* @param gearChannel - The solenoid channel for the gear selector
* @throws CANTimeoutException - when communication with the jaguar fails over the CAN bus
*/
public Tread(TankDrive parent, int canID, int gearChannel) throws CANTimeoutException
{
motor = new CANJaguar(canID, CANJaguar.ControlMode.kPercentVbus);
motor.configMaxOutputVoltage(Parameters.MaxMotorOutputVoltage);
motor.configNeutralMode(CANJaguar.NeutralMode.kBrake);
drive = parent;
gearShifter = new Solenoid(Parameters.crioRelayModule, gearChannel);
setGear(Gear.kLow);
}