Changes between Version 1 and Version 2 of ControlSystems/SoftwareTeam/Training/GettingStarted/DCMotor/CANCode


Ignore:
Timestamp:
Nov 8, 2019, 10:51:01 PM (6 years ago)
Author:
David Albert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ControlSystems/SoftwareTeam/Training/GettingStarted/DCMotor/CANCode

    v1 v2  
    1 {{{
     1/*----------------------------------------------------------------------------*/
     2/* Copyright (c) 2017-2018 FIRST. All Rights Reserved.                        */
     3/* Open Source Software - may be modified and shared by FRC teams. The code   */
     4/* must be accompanied by the FIRST BSD license file in the root directory of */
     5/* the project.                                                               */
     6/*----------------------------------------------------------------------------*/
     7
    28package frc.robot;
    39
     
    1622public class Robot extends TimedRobot {
    1723  private XboxController xbox;
    18   private WPI_TalonSRX m_rearLeft;
     24  private WPI_TalonSRX m_Left;
    1925
    2026  /**
     
    2531  public void robotInit() {
    2632    xbox = new XboxController(0);     // Xbox controller on port 0
    27     m_rearLeft = new WPI_TalonSRX(4); // CAN Talon ID 4
     33    m_Left = new WPI_TalonSRX(4); // CAN Talon ID 4
    2834  }
    2935
     
    6773    // 0=stop and +1.0 (full forward) power
    6874    // Set motor speed based on joystick
    69     m_rearLeft.set(x);
     75    m_Left.set(x);
    7076  }
    7177
     
    7783  }
    7884}
    79 }}}