Changes between Version 1 and Version 2 of ControlSystems/SoftwareTeam/Training/GettingStarted/DCMotor/CANCode
- Timestamp:
- Nov 8, 2019, 10:51:01 PM (6 years ago)
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 2 8 package frc.robot; 3 9 … … 16 22 public class Robot extends TimedRobot { 17 23 private XboxController xbox; 18 private WPI_TalonSRX m_ rearLeft;24 private WPI_TalonSRX m_Left; 19 25 20 26 /** … … 25 31 public void robotInit() { 26 32 xbox = new XboxController(0); // Xbox controller on port 0 27 m_ rearLeft = new WPI_TalonSRX(4); // CAN Talon ID 433 m_Left = new WPI_TalonSRX(4); // CAN Talon ID 4 28 34 } 29 35 … … 67 73 // 0=stop and +1.0 (full forward) power 68 74 // Set motor speed based on joystick 69 m_ rearLeft.set(x);75 m_Left.set(x); 70 76 } 71 77 … … 77 83 } 78 84 } 79 }}}