<commit_before> /*
 *  TPA Robot Drive
 *  Version: 0.1
 *  Desc: Allows polar mecanum driving using the TPAJoystick class and 4 speed controllers.
 */
package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

public class TPARobotDrive extends RobotDrive {
    
    private double m_magnitude;
    private double m_direction;
    private double m_rotation;
    private final TPAJoystick joystick;
    
   public TPARobotDrive(int frontLeftMotor, int rearLeftMotor, int frontRightMotor, int rearRightMotor, TPAJoystick joystick) {
        super(frontLeftMotor, rearLeftMotor, frontRightMotor, rearRightMotor);
        this.joystick=joystick;
    }
    
    public void mecanumDrive_Polar() {
        double throttle=(joystick.getRawAxis(4) - 1) / -2;
        TPALCD.getInstance().println(1, "Speed mult: x" + throttle);
        SmartDashboard.putNumber("Speed multiplier", throttle);
        m_magnitude = joystick.getMagnitude() * throttle;
        m_direction = joystick.getDirectionDegrees();
        m_rotation = joystick.getTwist() * throttle;
        
        mecanumDrive_Polar(m_magnitude, m_direction, m_rotation);
    }
}<commit_msg>Added getters for the motors.<commit_after> /*
 *  TPA Robot Drive
 *  Version: 0.1
 *  Desc: Allows polar mecanum driving using the TPAJoystick class and 4 speed controllers.
 */
package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SpeedController;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

public class TPARobotDrive extends RobotDrive {
    
    private double m_magnitude;
    private double m_direction;
    private double m_rotation;
    private final TPAJoystick joystick;
    
   public TPARobotDrive(int frontLeftMotor, int rearLeftMotor, int frontRightMotor, int rearRightMotor, TPAJoystick joystick) {
        super(frontLeftMotor, rearLeftMotor, frontRightMotor, rearRightMotor);
        this.joystick=joystick;
    }
    
    public void mecanumDrive_Polar() {
        double throttle=(joystick.getRawAxis(4) - 1) / -2;
        TPALCD.getInstance().println(1, "Speed mult: x" + throttle);
        SmartDashboard.putNumber("Speed multiplier", throttle);
        m_magnitude = joystick.getMagnitude() * throttle;
        m_direction = joystick.getDirectionDegrees();
        m_rotation = joystick.getTwist() * throttle;
        
        mecanumDrive_Polar(m_magnitude, m_direction, m_rotation);
    }

    public SpeedController getFrontLeftMotor()
    {
        return m_frontLeftMotor;
    }

    public SpeedController getFrontRightMotor()
    {
        return m_frontRightMotor;
    }

    public SpeedController getRearLeftMotor()
    {
        return m_rearLeftMotor;
    }

    public SpeedController getRearRightMotor()
    {
        return m_rearRightMotor;
    }
}
{'fraction_non_alphanumeric': 0.08484848484848485, 'fraction_numerical': 0.0047138047138047135, 'mean_word_length': 3.434328358208955, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2977015', 'n_tokens_mistral': 1052, 'n_tokens_neox': 947, 'n_words': 200}