mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
SCRIPT: 'edu.wpi.first' replacements
This commit is contained in:
committed by
Peter Johnson
parent
013a238994
commit
824f36f63a
@@ -38,7 +38,7 @@ Java_org_wpilib_hardware_hal_AddressableLEDJNI_initialize
|
||||
(JNIEnv* env, jclass, jint channel)
|
||||
{
|
||||
int32_t status = 0;
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "edu.wpi.first");
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "org.wpilib");
|
||||
auto ret = HAL_InitializeAddressableLED(channel, stack.c_str(), &status);
|
||||
CheckStatusForceThrow(env, status);
|
||||
return ret;
|
||||
|
||||
@@ -27,7 +27,7 @@ Java_org_wpilib_hardware_hal_AnalogJNI_initializeAnalogInputPort
|
||||
(JNIEnv* env, jclass, jint channel)
|
||||
{
|
||||
int32_t status = 0;
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "edu.wpi.first");
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "org.wpilib");
|
||||
auto analog = HAL_InitializeAnalogInputPort(channel, stack.c_str(), &status);
|
||||
CheckStatusForceThrow(env, status);
|
||||
return (jint)analog;
|
||||
|
||||
@@ -25,7 +25,7 @@ Java_org_wpilib_hardware_hal_CTREPCMJNI_initialize
|
||||
(JNIEnv* env, jclass, jint busId, jint module)
|
||||
{
|
||||
int32_t status = 0;
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "edu.wpi.first");
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "org.wpilib");
|
||||
auto handle = HAL_InitializeCTREPCM(busId, module, stack.c_str(), &status);
|
||||
CheckStatusForceThrow(env, status);
|
||||
return handle;
|
||||
|
||||
@@ -26,7 +26,7 @@ Java_org_wpilib_hardware_hal_CounterJNI_initializeCounter
|
||||
(JNIEnv* env, jclass, jint channel, jboolean risingEdge)
|
||||
{
|
||||
int32_t status = 0;
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "edu.wpi.first");
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "org.wpilib");
|
||||
auto counter =
|
||||
HAL_InitializeCounter(channel, risingEdge, stack.c_str(), &status);
|
||||
CheckStatusForceThrow(env, status);
|
||||
|
||||
@@ -28,7 +28,7 @@ Java_org_wpilib_hardware_hal_DIOJNI_initializeDIOPort
|
||||
(JNIEnv* env, jclass, jint channel, jboolean input)
|
||||
{
|
||||
int32_t status = 0;
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "edu.wpi.first");
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "org.wpilib");
|
||||
auto dio = HAL_InitializeDIOPort(channel, static_cast<uint8_t>(input),
|
||||
stack.c_str(), &status);
|
||||
CheckStatusForceThrow(env, status);
|
||||
|
||||
@@ -22,7 +22,7 @@ Java_org_wpilib_hardware_hal_DutyCycleJNI_initialize
|
||||
(JNIEnv* env, jclass, jint channel)
|
||||
{
|
||||
int32_t status = 0;
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "edu.wpi.first");
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "org.wpilib");
|
||||
auto handle = HAL_InitializeDutyCycle(channel, stack.c_str(), &status);
|
||||
CheckStatus(env, status);
|
||||
return handle;
|
||||
|
||||
@@ -117,7 +117,7 @@ void ReportError(JNIEnv* env, int32_t status, bool doThrow) {
|
||||
env, fmt::format(" Code: {}. {}", status, message).c_str(), status);
|
||||
} else {
|
||||
std::string func;
|
||||
auto stack = GetJavaStackTrace(env, &func, "edu.wpi.first");
|
||||
auto stack = GetJavaStackTrace(env, &func, "org.wpilib");
|
||||
// Make a copy of message for safety, calling back into the HAL might
|
||||
// invalidate the string.
|
||||
std::string lastMessage{message};
|
||||
|
||||
@@ -28,7 +28,7 @@ Java_org_wpilib_hardware_hal_PWMJNI_initializePWMPort
|
||||
(JNIEnv* env, jclass, jint channel)
|
||||
{
|
||||
int32_t status = 0;
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "edu.wpi.first");
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "org.wpilib");
|
||||
auto pwm = HAL_InitializePWMPort(channel, stack.c_str(), &status);
|
||||
CheckStatusForceThrow(env, status);
|
||||
return (jint)pwm;
|
||||
|
||||
@@ -33,7 +33,7 @@ Java_org_wpilib_hardware_hal_PowerDistributionJNI_initialize
|
||||
(JNIEnv* env, jclass, jint busId, jint module, jint type)
|
||||
{
|
||||
int32_t status = 0;
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "edu.wpi.first");
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "org.wpilib");
|
||||
auto handle = HAL_InitializePowerDistribution(
|
||||
busId, module, static_cast<HAL_PowerDistributionType>(type),
|
||||
stack.c_str(), &status);
|
||||
|
||||
@@ -38,7 +38,7 @@ Java_org_wpilib_hardware_hal_REVPHJNI_initialize
|
||||
(JNIEnv* env, jclass, jint busId, jint module)
|
||||
{
|
||||
int32_t status = 0;
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "edu.wpi.first");
|
||||
auto stack = wpi::util::java::GetJavaStackTrace(env, "org.wpilib");
|
||||
auto handle = HAL_InitializeREVPH(busId, module, stack.c_str(), &status);
|
||||
CheckStatusForceThrow(env, status);
|
||||
return handle;
|
||||
|
||||
@@ -600,7 +600,7 @@ public final class DriverStation {
|
||||
String loc = stackTrace[i].toString();
|
||||
traceString.append("\tat ").append(loc).append('\n');
|
||||
// get first user function
|
||||
if (!haveLoc && !loc.startsWith("edu.wpi.first")) {
|
||||
if (!haveLoc && !loc.startsWith("org.wpilib")) {
|
||||
locString = loc;
|
||||
haveLoc = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user