当前位置: 首页>>代码示例>>Java>>正文


Java CANJaguar.configNeutralMode方法代码示例

本文整理汇总了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;
    }
 
开发者ID:FIRST-FRC-Team-2028,项目名称:2012,代码行数:19,代码来源:SlingShot.java

示例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);
    }
}
 
开发者ID:Nashoba-Robotics,项目名称:NR-2014-CMD,代码行数:15,代码来源:ShooterRotator.java

示例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);
}
 
开发者ID:Team4189,项目名称:CanBusRobot,代码行数:9,代码来源:CanChassis.java

示例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;
}
 
开发者ID:FIRST-FRC-Team-2028,项目名称:2012,代码行数:13,代码来源:SteeringUnit.java

示例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);

}
 
开发者ID:FIRST-FRC-Team-2028,项目名称:2013,代码行数:10,代码来源:Shooter.java

示例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();
        }
    }
 
开发者ID:FIRST-FRC-Team-2028,项目名称:2013,代码行数:15,代码来源:Arm.java

示例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);
}
 
开发者ID:FIRST-FRC-Team-2028,项目名称:2012,代码行数:7,代码来源:Wheel.java

示例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); 
}
 
开发者ID:FIRST-FRC-Team-2028,项目名称:2013,代码行数:20,代码来源:Tread.java


注:本文中的edu.wpi.first.wpilibj.CANJaguar.configNeutralMode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。