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

项目:aeronautical-facilitation    文件:RobotDrive6.java   
/**
 * Free the speed controllers if they were allocated locally
 */
public void free() {
    if (m_allocatedSpeedControllers) {
        if (m_frontLeftMotor != null) {
            ((PWM) m_frontLeftMotor).free();
        }
        if (m_frontRightMotor != null) {
            ((PWM) m_frontRightMotor).free();
        }
        if (m_middleLeftMotor != null) {
            ((PWM) m_middleLeftMotor).free();
        }
        if (m_middleRightMotor != null) {
            ((PWM) m_middleRightMotor).free();
        }
        if (m_rearLeftMotor != null) {
            ((PWM) m_rearLeftMotor).free();
        }
        if (m_rearRightMotor != null) {
            ((PWM) m_rearRightMotor).free();
        }
    }
}
项目:Felix-2014    文件:RobotDriveSteering.java   
/**
 * Free the speed controllers if they were allocated locally
 */
public void free() {
    if (m_allocatedSpeedControllers) {
        if (m_frontLeftMotor != null) {
            ((PWM) m_frontLeftMotor).free();
        }
        if (m_frontRightMotor != null) {
            ((PWM) m_frontRightMotor).free();
        }
        if (m_rearLeftMotor != null) {
            ((PWM) m_rearLeftMotor).free();
        }
        if (m_rearRightMotor != null) {
            ((PWM) m_rearRightMotor).free();
        }
    }
}
项目:turtleshell    文件:RgbLED.java   
/**
 * Create RGB LED with 3 PWM ports
 *
 * @param redPort PWM port for Red LED
 * @param greenPort PWM port for Green LED
 * @param bluePort PWM port for Blue LED
 */
public RgbLED(int redPort, int greenPort, int bluePort) {
    red = new PWM(redPort);
    green = new PWM(greenPort);
    blue = new PWM(bluePort);

    set(0, 0, 0);
}
项目:turtleshell    文件:PWMLED.java   
/**
 * Create LED with PWM port
 */
public PWMLED(int port) {
    output = new PWM(port);

    set(0);
}
项目:strongback-java    文件:HardwareMotor.java   
public short getSpeedAsShort() {
    return (short) ((PWM) (controller)).getRaw();
}
项目:Lib2585    文件:RampedSpeedController.java   
@Override
public void destroy() {
    if (controller instanceof PWM) {
        ((PWM) controller).free();
    }
}
项目:Storm2013    文件:LED.java   
public LED(int port) {
    _led = new PWM(port);
}
项目:2013ultimate-ascent    文件:GRTLed.java   
/**
 * Instantiates an LED.
 *
 * @param moduleNum digital module number
 * @param channel channel LED is attached to
 * @param name name of LED
 */
public GRTLed(int moduleNum, int channel, String name) {

    led = new PWM(moduleNum, channel);
    led.setRaw(brightness);
}
项目:2013ultimate-ascent    文件:GRTLed.java   
/**
 * Instantiates an LED on the default digital module.
 *
 * @param channel channel LED is attached to
 * @param name name of LED
 */
public GRTLed(int channel, String name) {

    led = new PWM(channel);
    led.setRaw(brightness);
}
项目:grtframeworkv7    文件:GRTLed.java   
/**
 * Instantiates an LED.
 *
 * @param moduleNum digital module number
 * @param channel channel LED is attached to
 * @param name name of LED
 */
public GRTLed(int moduleNum, int channel, String name) {

    led = new PWM(moduleNum, channel);
    led.setRaw(brightness);
}
项目:grtframeworkv7    文件:GRTLed.java   
/**
 * Instantiates an LED on the default digital module.
 *
 * @param channel channel LED is attached to
 * @param name name of LED
 */
public GRTLed(int channel, String name) {

    led = new PWM(channel);
    led.setRaw(brightness);
}