微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

edu.wpi.first.wpilibj.templates.commands.SpitOut的实例源码

项目:RKellyBot    文件OI.java   
public OI(){
         LogDebugger.log("OI constructor");

//        btnA.whenpressed(new Lift());
//        btnB.whenpressed(new DeployLifter());
//        btnX.whenpressed(new StowArms());
//        btnLB.whenpressed(new PickUp());
//        btnLB.whenReleased(new CollectorDonothing());
//        btnRB.whenActive(new SpitOut());
//        btnRB.whenInactive(new CollectorDonothing());
        btnLT.whenpressed(new PickUp());
        btnLT.whenReleased(new CollectorDonothing());
        btnRT.whenActive(new SpitOut());
        btnRT.whenInactive(new CollectorDonothing());
        btnRB.whenReleased(new Shift());
        btnX.whenpressed(new DeployLifter());
        btnY.whenpressed(new Lift());
        btnB.whenpressed(new StowArms());
        btnLB.whenpressed(new ScaleShift());




        btnOtherA.whenpressed(new Flingernormal());
        btnOtherB.whenpressed(new FlingerOff());
        btnOtherX.whenpressed(new FlingerPowerSavingMode());
        btnOtherY.whenpressed(new FlingerPyrimidSpeed());
        btnOtherRT.whenpressed(new Shoot());
//        btnOtherA.whenpressed(new LEDBlingControl(Bling.marcH_RWB));
//        btnOtherB.whenpressed(new LEDBlingControl(Bling.METEOR));
//        btnOtherX.whenpressed(new LEDBlingControl(Bling.SHOOT));
//        btnOtherY.whenpressed(new LEDBlingControl(Bling.FADE_PG));
        btnOtherLB.whenpressed(new TiltUp());
        btnOtherLB.whenReleased(new Tiltnormal());
        btnOtherRB.whenpressed(new TiltDown());
        btnOtherRB.whenReleased(new Tiltnormal());

        bi1.whenpressed(new LEDBlingControl(Bling.marcH_RWB));
        bi2.whenpressed(new LEDBlingControl(Bling.METEOR));
        bi3.whenpressed(new LEDBlingControl(Bling.SHOOT));
        bi4.whenpressed(new LEDBlingControl(Bling.FADE_PG));
        resetLocation.whenpressed(new ResetDeadReckoner());
        //commandTestLog.whenpressed(new LogCommand())

        //SmartDashboard.putData("Command Test Log",commandTestLog);
        SmartDashboard.putData("Reset Location",resetLocation);
        SmartDashboard.putData("marcH_RWB",bi1);
        SmartDashboard.putData("METEOR",bi2);
        SmartDashboard.putData("SHOOT",bi3);
        SmartDashboard.putData("FADE_PG",bi4);
        SmartDashboard.putData("flinger normal",new Flingernormal());
        SmartDashboard.putData("flinger power saving mode",new FlingerPowerSavingMode());
        SmartDashboard.putData("Flinger off",new FlingerOff());
        SmartDashboard.putData("flinger Pyramid mode",new FlingerPyrimidSpeed());
    SmartDashboard.putData("Tune PID",new TunePID());


    }

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。