mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
committed by
Peter Johnson
parent
762c88adb8
commit
c58b072c89
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user