diff --git a/wpilibc/src/main/native/cpp/RobotDrive.cpp b/wpilibc/src/main/native/cpp/RobotDrive.cpp index a20eb657d3..fd43c960f1 100644 --- a/wpilibc/src/main/native/cpp/RobotDrive.cpp +++ b/wpilibc/src/main/native/cpp/RobotDrive.cpp @@ -1,5 +1,5 @@ /*----------------------------------------------------------------------------*/ -/* Copyright (c) 2008-2018 FIRST. All Rights Reserved. */ +/* Copyright (c) 2008-2019 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ @@ -120,8 +120,8 @@ void RobotDrive::Drive(double outputMagnitude, double curve) { double leftOutput, rightOutput; static bool reported = false; if (!reported) { - HAL_Report(HALUsageReporting::kResourceType_RobotDrive, GetNumMotors(), - HALUsageReporting::kRobotDrive_ArcadeRatioCurve); + HAL_Report(HALUsageReporting::kResourceType_RobotDrive, + HALUsageReporting::kRobotDrive_ArcadeRatioCurve, GetNumMotors()); reported = true; } @@ -180,8 +180,8 @@ void RobotDrive::TankDrive(double leftValue, double rightValue, bool squaredInputs) { static bool reported = false; if (!reported) { - HAL_Report(HALUsageReporting::kResourceType_RobotDrive, GetNumMotors(), - HALUsageReporting::kRobotDrive_Tank); + HAL_Report(HALUsageReporting::kResourceType_RobotDrive, + HALUsageReporting::kRobotDrive_Tank, GetNumMotors()); reported = true; } @@ -230,8 +230,8 @@ void RobotDrive::ArcadeDrive(double moveValue, double rotateValue, bool squaredInputs) { static bool reported = false; if (!reported) { - HAL_Report(HALUsageReporting::kResourceType_RobotDrive, GetNumMotors(), - HALUsageReporting::kRobotDrive_ArcadeStandard); + HAL_Report(HALUsageReporting::kResourceType_RobotDrive, + HALUsageReporting::kRobotDrive_ArcadeStandard, GetNumMotors()); reported = true; } @@ -273,8 +273,8 @@ void RobotDrive::MecanumDrive_Cartesian(double x, double y, double rotation, double gyroAngle) { static bool reported = false; if (!reported) { - HAL_Report(HALUsageReporting::kResourceType_RobotDrive, GetNumMotors(), - HALUsageReporting::kRobotDrive_MecanumCartesian); + HAL_Report(HALUsageReporting::kResourceType_RobotDrive, + HALUsageReporting::kRobotDrive_MecanumCartesian, GetNumMotors()); reported = true; } @@ -305,8 +305,8 @@ void RobotDrive::MecanumDrive_Polar(double magnitude, double direction, double rotation) { static bool reported = false; if (!reported) { - HAL_Report(HALUsageReporting::kResourceType_RobotDrive, GetNumMotors(), - HALUsageReporting::kRobotDrive_MecanumPolar); + HAL_Report(HALUsageReporting::kResourceType_RobotDrive, + HALUsageReporting::kRobotDrive_MecanumPolar, GetNumMotors()); reported = true; } diff --git a/wpilibc/src/main/native/cpp/drive/DifferentialDrive.cpp b/wpilibc/src/main/native/cpp/drive/DifferentialDrive.cpp index c41e395264..2880807fbf 100644 --- a/wpilibc/src/main/native/cpp/drive/DifferentialDrive.cpp +++ b/wpilibc/src/main/native/cpp/drive/DifferentialDrive.cpp @@ -33,8 +33,8 @@ void DifferentialDrive::ArcadeDrive(double xSpeed, double zRotation, bool squareInputs) { static bool reported = false; if (!reported) { - HAL_Report(HALUsageReporting::kResourceType_RobotDrive, 2, - HALUsageReporting::kRobotDrive2_DifferentialArcade); + HAL_Report(HALUsageReporting::kResourceType_RobotDrive, + HALUsageReporting::kRobotDrive2_DifferentialArcade, 2); reported = true; } @@ -88,8 +88,8 @@ void DifferentialDrive::CurvatureDrive(double xSpeed, double zRotation, bool isQuickTurn) { static bool reported = false; if (!reported) { - HAL_Report(HALUsageReporting::kResourceType_RobotDrive, 2, - HALUsageReporting::kRobotDrive2_DifferentialCurvature); + HAL_Report(HALUsageReporting::kResourceType_RobotDrive, + HALUsageReporting::kRobotDrive2_DifferentialCurvature, 2); reported = true; } @@ -162,8 +162,8 @@ void DifferentialDrive::TankDrive(double leftSpeed, double rightSpeed, bool squareInputs) { static bool reported = false; if (!reported) { - HAL_Report(HALUsageReporting::kResourceType_RobotDrive, 2, - HALUsageReporting::kRobotDrive2_DifferentialTank); + HAL_Report(HALUsageReporting::kResourceType_RobotDrive, + HALUsageReporting::kRobotDrive2_DifferentialTank, 2); reported = true; } diff --git a/wpilibc/src/main/native/cpp/drive/KilloughDrive.cpp b/wpilibc/src/main/native/cpp/drive/KilloughDrive.cpp index 60af5afd07..2a71f618fc 100644 --- a/wpilibc/src/main/native/cpp/drive/KilloughDrive.cpp +++ b/wpilibc/src/main/native/cpp/drive/KilloughDrive.cpp @@ -48,8 +48,8 @@ KilloughDrive::KilloughDrive(SpeedController& leftMotor, void KilloughDrive::DriveCartesian(double ySpeed, double xSpeed, double zRotation, double gyroAngle) { if (!reported) { - HAL_Report(HALUsageReporting::kResourceType_RobotDrive, 3, - HALUsageReporting::kRobotDrive2_KilloughCartesian); + HAL_Report(HALUsageReporting::kResourceType_RobotDrive, + HALUsageReporting::kRobotDrive2_KilloughCartesian, 3); reported = true; } @@ -80,8 +80,8 @@ void KilloughDrive::DriveCartesian(double ySpeed, double xSpeed, void KilloughDrive::DrivePolar(double magnitude, double angle, double zRotation) { if (!reported) { - HAL_Report(HALUsageReporting::kResourceType_RobotDrive, 3, - HALUsageReporting::kRobotDrive2_KilloughPolar); + HAL_Report(HALUsageReporting::kResourceType_RobotDrive, + HALUsageReporting::kRobotDrive2_KilloughPolar, 3); reported = true; } diff --git a/wpilibc/src/main/native/cpp/drive/MecanumDrive.cpp b/wpilibc/src/main/native/cpp/drive/MecanumDrive.cpp index 55929c5815..c3256b962b 100644 --- a/wpilibc/src/main/native/cpp/drive/MecanumDrive.cpp +++ b/wpilibc/src/main/native/cpp/drive/MecanumDrive.cpp @@ -41,8 +41,8 @@ MecanumDrive::MecanumDrive(SpeedController& frontLeftMotor, void MecanumDrive::DriveCartesian(double ySpeed, double xSpeed, double zRotation, double gyroAngle) { if (!reported) { - HAL_Report(HALUsageReporting::kResourceType_RobotDrive, 4, - HALUsageReporting::kRobotDrive2_MecanumCartesian); + HAL_Report(HALUsageReporting::kResourceType_RobotDrive, + HALUsageReporting::kRobotDrive2_MecanumCartesian, 4); reported = true; } @@ -77,8 +77,8 @@ void MecanumDrive::DriveCartesian(double ySpeed, double xSpeed, void MecanumDrive::DrivePolar(double magnitude, double angle, double zRotation) { if (!reported) { - HAL_Report(HALUsageReporting::kResourceType_RobotDrive, 4, - HALUsageReporting::kRobotDrive2_MecanumPolar); + HAL_Report(HALUsageReporting::kResourceType_RobotDrive, + HALUsageReporting::kRobotDrive2_MecanumPolar, 4); reported = true; } diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotDrive.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotDrive.java index 297dd37312..e6a8a623b4 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotDrive.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/RobotDrive.java @@ -170,8 +170,8 @@ public class RobotDrive extends MotorSafety implements AutoCloseable { final double rightOutput; if (!kArcadeRatioCurve_Reported) { - HAL.report(tResourceType.kResourceType_RobotDrive, getNumMotors(), - tInstances.kRobotDrive_ArcadeRatioCurve); + HAL.report(tResourceType.kResourceType_RobotDrive, tInstances.kRobotDrive_ArcadeRatioCurve, + getNumMotors()); kArcadeRatioCurve_Reported = true; } if (curve < 0) { @@ -273,8 +273,8 @@ public class RobotDrive extends MotorSafety implements AutoCloseable { */ public void tankDrive(double leftValue, double rightValue, boolean squaredInputs) { if (!kTank_Reported) { - HAL.report(tResourceType.kResourceType_RobotDrive, getNumMotors(), - tInstances.kRobotDrive_Tank); + HAL.report(tResourceType.kResourceType_RobotDrive, tInstances.kRobotDrive_Tank, + getNumMotors()); kTank_Reported = true; } @@ -378,8 +378,8 @@ public class RobotDrive extends MotorSafety implements AutoCloseable { public void arcadeDrive(double moveValue, double rotateValue, boolean squaredInputs) { // local variables to hold the computed PWM values for the motors if (!kArcadeStandard_Reported) { - HAL.report(tResourceType.kResourceType_RobotDrive, getNumMotors(), - tInstances.kRobotDrive_ArcadeStandard); + HAL.report(tResourceType.kResourceType_RobotDrive, tInstances.kRobotDrive_ArcadeStandard, + getNumMotors()); kArcadeStandard_Reported = true; } @@ -451,8 +451,8 @@ public class RobotDrive extends MotorSafety implements AutoCloseable { @SuppressWarnings("ParameterName") public void mecanumDrive_Cartesian(double x, double y, double rotation, double gyroAngle) { if (!kMecanumCartesian_Reported) { - HAL.report(tResourceType.kResourceType_RobotDrive, getNumMotors(), - tInstances.kRobotDrive_MecanumCartesian); + HAL.report(tResourceType.kResourceType_RobotDrive, tInstances.kRobotDrive_MecanumCartesian, + getNumMotors()); kMecanumCartesian_Reported = true; } @SuppressWarnings("LocalVariableName") @@ -496,8 +496,8 @@ public class RobotDrive extends MotorSafety implements AutoCloseable { */ public void mecanumDrive_Polar(double magnitude, double direction, double rotation) { if (!kMecanumPolar_Reported) { - HAL.report(tResourceType.kResourceType_RobotDrive, getNumMotors(), - tInstances.kRobotDrive_MecanumPolar); + HAL.report(tResourceType.kResourceType_RobotDrive, tInstances.kRobotDrive_MecanumPolar, + getNumMotors()); kMecanumPolar_Reported = true; } // Normalized for full power along the Cartesian axes. diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/DifferentialDrive.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/DifferentialDrive.java index 80400f3168..da71fd43fb 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/DifferentialDrive.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/DifferentialDrive.java @@ -174,8 +174,8 @@ public class DifferentialDrive extends RobotDriveBase implements Sendable { @SuppressWarnings("ParameterName") public void arcadeDrive(double xSpeed, double zRotation, boolean squareInputs) { if (!m_reported) { - HAL.report(tResourceType.kResourceType_RobotDrive, 2, - tInstances.kRobotDrive2_DifferentialArcade); + HAL.report(tResourceType.kResourceType_RobotDrive, + tInstances.kRobotDrive2_DifferentialArcade, 2); m_reported = true; } @@ -241,8 +241,8 @@ public class DifferentialDrive extends RobotDriveBase implements Sendable { @SuppressWarnings({"ParameterName", "PMD.CyclomaticComplexity"}) public void curvatureDrive(double xSpeed, double zRotation, boolean isQuickTurn) { if (!m_reported) { - HAL.report(tResourceType.kResourceType_RobotDrive, 2, - tInstances.kRobotDrive2_DifferentialCurvature); + HAL.report(tResourceType.kResourceType_RobotDrive, + tInstances.kRobotDrive2_DifferentialCurvature, 2); m_reported = true; } @@ -332,8 +332,8 @@ public class DifferentialDrive extends RobotDriveBase implements Sendable { */ public void tankDrive(double leftSpeed, double rightSpeed, boolean squareInputs) { if (!m_reported) { - HAL.report(tResourceType.kResourceType_RobotDrive, 2, - tInstances.kRobotDrive2_DifferentialTank); + HAL.report(tResourceType.kResourceType_RobotDrive, + tInstances.kRobotDrive2_DifferentialTank, 2); m_reported = true; } diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/KilloughDrive.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/KilloughDrive.java index 95c7c18289..64e5e4cb38 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/KilloughDrive.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/KilloughDrive.java @@ -169,8 +169,8 @@ public class KilloughDrive extends RobotDriveBase implements Sendable { public void driveCartesian(double ySpeed, double xSpeed, double zRotation, double gyroAngle) { if (!m_reported) { - HAL.report(tResourceType.kResourceType_RobotDrive, 3, - tInstances.kRobotDrive2_KilloughCartesian); + HAL.report(tResourceType.kResourceType_RobotDrive, + tInstances.kRobotDrive2_KilloughCartesian, 3); m_reported = true; } @@ -212,8 +212,8 @@ public class KilloughDrive extends RobotDriveBase implements Sendable { @SuppressWarnings("ParameterName") public void drivePolar(double magnitude, double angle, double zRotation) { if (!m_reported) { - HAL.report(tResourceType.kResourceType_RobotDrive, 3, - tInstances.kRobotDrive2_KilloughPolar); + HAL.report(tResourceType.kResourceType_RobotDrive, + tInstances.kRobotDrive2_KilloughPolar, 3); m_reported = true; } diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/MecanumDrive.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/MecanumDrive.java index 4ede5a48c2..62a2161cbc 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/MecanumDrive.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/drive/MecanumDrive.java @@ -154,8 +154,8 @@ public class MecanumDrive extends RobotDriveBase implements Sendable { @SuppressWarnings("ParameterName") public void driveCartesian(double ySpeed, double xSpeed, double zRotation, double gyroAngle) { if (!m_reported) { - HAL.report(tResourceType.kResourceType_RobotDrive, 4, - tInstances.kRobotDrive2_MecanumCartesian); + HAL.report(tResourceType.kResourceType_RobotDrive, + tInstances.kRobotDrive2_MecanumCartesian, 4); m_reported = true; } @@ -201,7 +201,7 @@ public class MecanumDrive extends RobotDriveBase implements Sendable { @SuppressWarnings("ParameterName") public void drivePolar(double magnitude, double angle, double zRotation) { if (!m_reported) { - HAL.report(tResourceType.kResourceType_RobotDrive, 4, tInstances.kRobotDrive2_MecanumPolar); + HAL.report(tResourceType.kResourceType_RobotDrive, tInstances.kRobotDrive2_MecanumPolar, 4); m_reported = true; }