Changes between Version 6 and Version 7 of ControlSystems/SoftwareTeam/Training/GettingStarted/ClosedLoopControl


Ignore:
Timestamp:
Nov 3, 2019, 9:11:27 PM (6 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/Training/GettingStarted/ClosedLoopControl

    v6 v7  
    5757            rightMotor.set(rightPower);
    5858          }
    59           if ((leftEncoder.getDistance() > 36.0) ||
    60               (rightEncoder.getDistance() > 36.0)) {
     59
     60          // For PWM Motor Controllers uncomment the following 2 lines
     61          //if ((leftEncoder.getDistance() > 36.0) ||
     62          //    (rightEncoder.getDistance() > 36.0)) {
     63
     64          // For CAN motor controllers uncomment the following 4 lines
     65          //int l_raw = leftMotor.getSelectedSensorPosition();
     66          //int r_raw = rightMotor.getSelectedSensorPosition();
     67          //if ((raw2inches(l_raw, 360*2, 7.5) > 36.0) ||
     68          //    (raw2inches(r_raw, 360*2, 7.5) > 36.0)) {
     69
    6170              leftMotor.stopMotor();
    6271              rightMotor.stopMotor();