Changes between Version 1 and Version 2 of Position Mode


Ignore:
Timestamp:
Feb 13, 2016, 4:21:52 PM (9 years ago)
Author:
alex
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Position Mode

    v1 v2  
    1616In the constructor of your subsystem, you need:
    1717
    18 {{{armMotor.setFeedbackDevice(FeedbackDevice.EncoderType);}}}
     18{{{talon.setFeedbackDevice(FeedbackDevice.EncoderType);}}}
    1919
    20 {{{armMotor.configEncoderCodesPerRev(X);}}}
     20{{{talon.configEncoderCodesPerRev(X);}}}
    2121
    2222Note that on QuadEncoders this is the nominal value, not the actual value
    2323
    24 {{{armMotor.setEncPosition(0);}}}
     24{{{talon.setEncPosition(0);}}}
    2525
    2626This will save you a lot of future headache
     
    3030{{{
    3131public void enable() {
    32         armMotor.enableControl();
     32        talon.enableControl();
    3333}
    3434}}}
     
    3636{{{
    3737public void positionMode() {
    38         armMotor.changeControlMode(TalonControlMode.Position);
    39         armMotor.setPID(P, I, D);
     38        talon.changeControlMode(TalonControlMode.Position);
     39        talon.setPID(P, I, D);
    4040}
    4141}}}
     
    4646
    4747{{{
    48 Robot.armSys.positionMode();
    49 Robot.armSys.enable();
     48Robot.SubSystem.positionMode();
     49Robot.SubSystem.enable();
    5050}}}
    5151
     
    5353
    5454{{{
    55 Robot.armSys.setArmTalon(1F);
     55Robot.SubSystem.<SetCommand>(1F);
    5656}}}
    5757