Java 类edu.wpi.first.wpilibj.ControllerPower 实例源码

项目:Stronghold2016-340    文件:RollersSpeedOut.java   
protected void execute() {
    if(this.timeSinceInitialized()<Robot.harvesterRollers.SHOOTER_SHOOT_SPINUP_TIME){
        Robot.harvesterRollers.setBallControl(Robot.harvesterRollers.HARVESTER_HARVEST_V_BUS*12/ControllerPower.getInputVoltage());
    }else{
        Robot.harvesterRollers.setBallControl(0);
    }
    Robot.harvesterRollers.setShooter(-10/ControllerPower.getInputVoltage());
}
项目:scorpion    文件:AnalogPot.java   
/**
 * Get the current reading of the potentiometer.
 *
 * @return The current position of the potentiometer.
 */
public double get() {
    if(m_analog_input.onRIO)
    {
        return (m_analog_input.get() / ControllerPower.getVoltage5V()) * m_fullRange + m_offset;
    }
    else
    {
        return m_analog_input.get() * m_fullRange + m_offset;
    }
}
项目:scorpion    文件:AnalogPot.java   
public double getRaw() {
    if(m_analog_input.onRIO)
    {
        return m_analog_input.get() / ControllerPower.getVoltage5V();
    }
    else
    {
        return m_analog_input.get();
    }
}
项目:ToastDroid    文件:TilePDP.java   
@Override
public void tick_update() {
    update++;
    if (update >= 2) {
        if (!ControllerPower.getEnabled6V() || !ControllerPower.getEnabled3V3() || !ControllerPower.getEnabled5V())
            setColor(100, 33, 33);
        else
            setColor(33, 33, 33);
        update();
    }
}
项目:Stronghold2016-340    文件:RollersShootFire.java   
protected void execute() {
    Robot.harvesterRollers.setShooter(-10/ControllerPower.getInputVoltage());
    Robot.harvesterRollers.setBallControl(Robot.harvesterRollers.HARVESTER_DISCHARGE_BALL_V_BUS);
}