diff --git a/config.gradle b/config.gradle index 63b6df0b61..dd6779ab03 100644 --- a/config.gradle +++ b/config.gradle @@ -8,7 +8,7 @@ def windowsLinkerArgs = [ '/DEBUG:FULL' ] def windowsReleaseLinkerArgs = [ '/OPT:REF', '/OPT:ICF' ] def linuxCompilerArgs = ['-std=c++1y', '-Wformat=2', '-Wall', '-Wextra', '-Werror', '-pedantic', '-Wno-psabi', '-g', - '-Wno-unused-parameter', '-fPIC', '-rdynamic', '-Wno-error=deprecated-declarations', '-pthread'] + '-Wno-unused-parameter', '-fPIC', '-rdynamic', '-pthread'] def linuxLinkerArgs = ['-rdynamic', '-pthread'] def linuxReleaseCompilerArgs = ['-O2'] def linuxDebugCompilerArgs = ['-O0'] diff --git a/hal/src/main/native/athena/FRCDriverStation.cpp b/hal/src/main/native/athena/FRCDriverStation.cpp index 1784ef8a7a..9e0c47ed91 100644 --- a/hal/src/main/native/athena/FRCDriverStation.cpp +++ b/hal/src/main/native/athena/FRCDriverStation.cpp @@ -33,11 +33,6 @@ static int newDSDataAvailableCounter{0}; extern "C" { -int32_t HAL_SetErrorData(const char* errors, int32_t errorsLength, - int32_t waitMs) { - return setErrorData(errors, errorsLength, waitMs); -} - int32_t HAL_SendError(HAL_Bool isError, int32_t errorCode, HAL_Bool isLVCode, const char* details, const char* location, const char* callStack, HAL_Bool printMsg) { diff --git a/hal/src/main/native/include/HAL/DriverStation.h b/hal/src/main/native/include/HAL/DriverStation.h index 8049ece882..8ebc6df00b 100644 --- a/hal/src/main/native/include/HAL/DriverStation.h +++ b/hal/src/main/native/include/HAL/DriverStation.h @@ -98,8 +98,6 @@ struct HAL_MatchInfo { extern "C" { #endif -int32_t HAL_SetErrorData(const char* errors, int32_t errorsLength, - int32_t waitMs); int32_t HAL_SendError(HAL_Bool isError, int32_t errorCode, HAL_Bool isLVCode, const char* details, const char* location, const char* callStack, HAL_Bool printMsg); diff --git a/hal/src/main/native/sim/DriverStation.cpp b/hal/src/main/native/sim/DriverStation.cpp index 3aafca204b..7ee4c82877 100644 --- a/hal/src/main/native/sim/DriverStation.cpp +++ b/hal/src/main/native/sim/DriverStation.cpp @@ -29,11 +29,6 @@ static int newDSDataAvailableCounter{0}; using namespace hal; extern "C" { -int32_t HAL_SetErrorData(const char* errors, int32_t errorsLength, - int32_t waitMs) { - return 0; -} - int32_t HAL_SendError(HAL_Bool isError, int32_t errorCode, HAL_Bool isLVCode, const char* details, const char* location, const char* callStack, HAL_Bool printMsg) { diff --git a/myRobot/src/main/native/cpp/MyRobot.cpp b/myRobot/src/main/native/cpp/MyRobot.cpp index 3a25f3df9f..98784789e6 100644 --- a/myRobot/src/main/native/cpp/MyRobot.cpp +++ b/myRobot/src/main/native/cpp/MyRobot.cpp @@ -5,7 +5,7 @@ /* the project. */ /*----------------------------------------------------------------------------*/ -#include "WPILib.h" +#include "IterativeRobot.h" class MyRobot : public IterativeRobot { /** diff --git a/wpilibc/src/main/native/include/RobotDrive.h b/wpilibc/src/main/native/include/RobotDrive.h index 5203816407..b2b1dfec61 100644 --- a/wpilibc/src/main/native/include/RobotDrive.h +++ b/wpilibc/src/main/native/include/RobotDrive.h @@ -31,9 +31,7 @@ class GenericHID; * function (intended for hand created drive code, such as autonomous) or with * the Tank/Arcade functions intended to be used for Operator Control driving. */ -class WPI_DEPRECATED("Use DifferentialDrive or MecanumDrive classes instead.") - RobotDrive : public MotorSafety, - public ErrorBase { +class RobotDrive : public MotorSafety, public ErrorBase { public: enum MotorType { kFrontLeftMotor = 0, @@ -42,17 +40,25 @@ class WPI_DEPRECATED("Use DifferentialDrive or MecanumDrive classes instead.") kRearRightMotor = 3 }; + WPI_DEPRECATED("Use DifferentialDrive or MecanumDrive classes instead.") RobotDrive(int leftMotorChannel, int rightMotorChannel); + WPI_DEPRECATED("Use DifferentialDrive or MecanumDrive classes instead.") RobotDrive(int frontLeftMotorChannel, int rearLeftMotorChannel, int frontRightMotorChannel, int rearRightMotorChannel); + WPI_DEPRECATED("Use DifferentialDrive or MecanumDrive classes instead.") RobotDrive(SpeedController* leftMotor, SpeedController* rightMotor); + WPI_DEPRECATED("Use DifferentialDrive or MecanumDrive classes instead.") RobotDrive(SpeedController& leftMotor, SpeedController& rightMotor); + WPI_DEPRECATED("Use DifferentialDrive or MecanumDrive classes instead.") RobotDrive(std::shared_ptr leftMotor, std::shared_ptr rightMotor); + WPI_DEPRECATED("Use DifferentialDrive or MecanumDrive classes instead.") RobotDrive(SpeedController* frontLeftMotor, SpeedController* rearLeftMotor, SpeedController* frontRightMotor, SpeedController* rearRightMotor); + WPI_DEPRECATED("Use DifferentialDrive or MecanumDrive classes instead.") RobotDrive(SpeedController& frontLeftMotor, SpeedController& rearLeftMotor, SpeedController& frontRightMotor, SpeedController& rearRightMotor); + WPI_DEPRECATED("Use DifferentialDrive or MecanumDrive classes instead.") RobotDrive(std::shared_ptr frontLeftMotor, std::shared_ptr rearLeftMotor, std::shared_ptr frontRightMotor, diff --git a/wpilibj/src/main/native/cpp/HAL.cpp b/wpilibj/src/main/native/cpp/HAL.cpp index 6dcceb89a6..d60aad6c21 100644 --- a/wpilibj/src/main/native/cpp/HAL.cpp +++ b/wpilibj/src/main/native/cpp/HAL.cpp @@ -358,22 +358,6 @@ Java_edu_wpi_first_wpilibj_hal_HAL_getBrownedOut(JNIEnv* env, jclass) { return val; } -/* - * Class: edu_wpi_first_wpilibj_hal_HAL - * Method: HAL_SetErrorData - * Signature: (Ljava/lang/String;)I - */ -JNIEXPORT jint JNICALL -Java_edu_wpi_first_wpilibj_hal_HAL_setErrorData(JNIEnv* env, jclass, - jstring error) { - JStringRef errorStr{env, error}; - - NETCOMM_LOG(logDEBUG) << "Set Error: " << errorStr.c_str(); - NETCOMM_LOG(logDEBUG) << "Length: " << errorStr.size(); - jint returnValue = HAL_SetErrorData(errorStr.c_str(), (int32_t)errorStr.size(), 0); - return returnValue; -} - /* * Class: edu_wpi_first_wpilibj_hal_HAL * Method: HAL_SendError