mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
SCRIPT Run java package replacements
This commit is contained in:
committed by
Peter Johnson
parent
12823a003d
commit
f0a3c64121
@@ -10,30 +10,30 @@
|
||||
#include <wpi/jni_util.h>
|
||||
|
||||
#include "HALUtil.h"
|
||||
#include "edu_wpi_first_hal_DriverStationJNI.h"
|
||||
#include "org_wpilib_hardware_hal_DriverStationJNI.h"
|
||||
#include "hal/DriverStation.h"
|
||||
#include "hal/HALBase.h"
|
||||
|
||||
static_assert(edu_wpi_first_hal_DriverStationJNI_kUnknownAllianceStation ==
|
||||
static_assert(org_wpilib_hardware_hal_DriverStationJNI_kUnknownAllianceStation ==
|
||||
HAL_AllianceStationID_kUnknown);
|
||||
static_assert(edu_wpi_first_hal_DriverStationJNI_kRed1AllianceStation ==
|
||||
static_assert(org_wpilib_hardware_hal_DriverStationJNI_kRed1AllianceStation ==
|
||||
HAL_AllianceStationID_kRed1);
|
||||
static_assert(edu_wpi_first_hal_DriverStationJNI_kRed2AllianceStation ==
|
||||
static_assert(org_wpilib_hardware_hal_DriverStationJNI_kRed2AllianceStation ==
|
||||
HAL_AllianceStationID_kRed2);
|
||||
static_assert(edu_wpi_first_hal_DriverStationJNI_kRed3AllianceStation ==
|
||||
static_assert(org_wpilib_hardware_hal_DriverStationJNI_kRed3AllianceStation ==
|
||||
HAL_AllianceStationID_kRed3);
|
||||
static_assert(edu_wpi_first_hal_DriverStationJNI_kBlue1AllianceStation ==
|
||||
static_assert(org_wpilib_hardware_hal_DriverStationJNI_kBlue1AllianceStation ==
|
||||
HAL_AllianceStationID_kBlue1);
|
||||
static_assert(edu_wpi_first_hal_DriverStationJNI_kBlue2AllianceStation ==
|
||||
static_assert(org_wpilib_hardware_hal_DriverStationJNI_kBlue2AllianceStation ==
|
||||
HAL_AllianceStationID_kBlue2);
|
||||
static_assert(edu_wpi_first_hal_DriverStationJNI_kBlue3AllianceStation ==
|
||||
static_assert(org_wpilib_hardware_hal_DriverStationJNI_kBlue3AllianceStation ==
|
||||
HAL_AllianceStationID_kBlue3);
|
||||
|
||||
static_assert(edu_wpi_first_hal_DriverStationJNI_kMaxJoystickAxes ==
|
||||
static_assert(org_wpilib_hardware_hal_DriverStationJNI_kMaxJoystickAxes ==
|
||||
HAL_kMaxJoystickAxes);
|
||||
static_assert(edu_wpi_first_hal_DriverStationJNI_kMaxJoystickPOVs ==
|
||||
static_assert(org_wpilib_hardware_hal_DriverStationJNI_kMaxJoystickPOVs ==
|
||||
HAL_kMaxJoystickPOVs);
|
||||
static_assert(edu_wpi_first_hal_DriverStationJNI_kMaxJoysticks ==
|
||||
static_assert(org_wpilib_hardware_hal_DriverStationJNI_kMaxJoysticks ==
|
||||
HAL_kMaxJoysticks);
|
||||
|
||||
using namespace hal;
|
||||
@@ -42,72 +42,72 @@ using namespace wpi::java;
|
||||
extern "C" {
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: observeUserProgramStarting
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_observeUserProgramStarting
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_observeUserProgramStarting
|
||||
(JNIEnv*, jclass)
|
||||
{
|
||||
HAL_ObserveUserProgramStarting();
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: observeUserProgramDisabled
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_observeUserProgramDisabled
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_observeUserProgramDisabled
|
||||
(JNIEnv*, jclass)
|
||||
{
|
||||
HAL_ObserveUserProgramDisabled();
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: observeUserProgramAutonomous
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_observeUserProgramAutonomous
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_observeUserProgramAutonomous
|
||||
(JNIEnv*, jclass)
|
||||
{
|
||||
HAL_ObserveUserProgramAutonomous();
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: observeUserProgramTeleop
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_observeUserProgramTeleop
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_observeUserProgramTeleop
|
||||
(JNIEnv*, jclass)
|
||||
{
|
||||
HAL_ObserveUserProgramTeleop();
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: observeUserProgramTest
|
||||
* Signature: ()V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_observeUserProgramTest
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_observeUserProgramTest
|
||||
(JNIEnv*, jclass)
|
||||
{
|
||||
HAL_ObserveUserProgramTest();
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: nativeGetControlWord
|
||||
* Signature: ()I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_nativeGetControlWord
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_nativeGetControlWord
|
||||
(JNIEnv*, jclass)
|
||||
{
|
||||
static_assert(sizeof(HAL_ControlWord) == sizeof(jint),
|
||||
@@ -120,12 +120,12 @@ Java_edu_wpi_first_hal_DriverStationJNI_nativeGetControlWord
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: nativeGetAllianceStation
|
||||
* Signature: ()I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_nativeGetAllianceStation
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_nativeGetAllianceStation
|
||||
(JNIEnv*, jclass)
|
||||
{
|
||||
int32_t status = 0;
|
||||
@@ -134,12 +134,12 @@ Java_edu_wpi_first_hal_DriverStationJNI_nativeGetAllianceStation
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: getAllJoystickData
|
||||
* Signature: (I[F[S[B[J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_getAllJoystickData
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_getAllJoystickData
|
||||
(JNIEnv* env, jclass cls, jint stick, jfloatArray axesArray,
|
||||
jshortArray rawAxesArray, jbyteArray povsArray,
|
||||
jlongArray buttonsAndMetadataArray)
|
||||
@@ -169,48 +169,48 @@ Java_edu_wpi_first_hal_DriverStationJNI_getAllJoystickData
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: setJoystickOutputs
|
||||
* Signature: (BIII)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_setJoystickOutputs
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_setJoystickOutputs
|
||||
(JNIEnv*, jclass, jbyte port, jint outputs, jint leftRumble, jint rightRumble)
|
||||
{
|
||||
return HAL_SetJoystickOutputs(port, outputs, leftRumble, rightRumble);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: getJoystickIsGamepad
|
||||
* Signature: (B)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_getJoystickIsGamepad
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_getJoystickIsGamepad
|
||||
(JNIEnv*, jclass, jbyte port)
|
||||
{
|
||||
return HAL_GetJoystickIsGamepad(port);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: getJoystickType
|
||||
* Signature: (B)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_getJoystickType
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_getJoystickType
|
||||
(JNIEnv*, jclass, jbyte port)
|
||||
{
|
||||
return HAL_GetJoystickType(port);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: getJoystickName
|
||||
* Signature: (B)Ljava/lang/String;
|
||||
*/
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_getJoystickName
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_getJoystickName
|
||||
(JNIEnv* env, jclass, jbyte port)
|
||||
{
|
||||
WPI_String joystickName;
|
||||
@@ -221,12 +221,12 @@ Java_edu_wpi_first_hal_DriverStationJNI_getJoystickName
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: getMatchTime
|
||||
* Signature: ()D
|
||||
*/
|
||||
JNIEXPORT jdouble JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_getMatchTime
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_getMatchTime
|
||||
(JNIEnv* env, jclass)
|
||||
{
|
||||
int32_t status = 0;
|
||||
@@ -234,12 +234,12 @@ Java_edu_wpi_first_hal_DriverStationJNI_getMatchTime
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: getMatchInfo
|
||||
* Signature: (Ljava/lang/Object;)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_getMatchInfo
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_getMatchInfo
|
||||
(JNIEnv* env, jclass, jobject info)
|
||||
{
|
||||
HAL_MatchInfo matchInfo;
|
||||
@@ -251,12 +251,12 @@ Java_edu_wpi_first_hal_DriverStationJNI_getMatchInfo
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: sendError
|
||||
* Signature: (ZIZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_sendError
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_sendError
|
||||
(JNIEnv* env, jclass, jboolean isError, jint errorCode, jboolean isLVCode,
|
||||
jstring details, jstring location, jstring callStack, jboolean printMsg)
|
||||
{
|
||||
@@ -271,12 +271,12 @@ Java_edu_wpi_first_hal_DriverStationJNI_sendError
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: sendConsoleLine
|
||||
* Signature: (Ljava/lang/String;)I
|
||||
*/
|
||||
JNIEXPORT jint JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_sendConsoleLine
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_sendConsoleLine
|
||||
(JNIEnv* env, jclass, jstring line)
|
||||
{
|
||||
JStringRef lineStr{env, line};
|
||||
@@ -286,48 +286,48 @@ Java_edu_wpi_first_hal_DriverStationJNI_sendConsoleLine
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: refreshDSData
|
||||
* Signature: ()Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_refreshDSData
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_refreshDSData
|
||||
(JNIEnv*, jclass)
|
||||
{
|
||||
return HAL_RefreshDSData();
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: provideNewDataEventHandle
|
||||
* Signature: (I)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_provideNewDataEventHandle
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_provideNewDataEventHandle
|
||||
(JNIEnv*, jclass, jint handle)
|
||||
{
|
||||
HAL_ProvideNewDataEventHandle(handle);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: removeNewDataEventHandle
|
||||
* Signature: (I)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_removeNewDataEventHandle
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_removeNewDataEventHandle
|
||||
(JNIEnv*, jclass, jint handle)
|
||||
{
|
||||
HAL_RemoveNewDataEventHandle(handle);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_DriverStationJNI
|
||||
* Class: org_wpilib_hardware_hal_DriverStationJNI
|
||||
* Method: getOutputsActive
|
||||
* Signature: ()Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_edu_wpi_first_hal_DriverStationJNI_getOutputsActive
|
||||
Java_org_wpilib_hardware_hal_DriverStationJNI_getOutputsActive
|
||||
(JNIEnv*, jclass)
|
||||
{
|
||||
return HAL_GetOutputsEnabled();
|
||||
|
||||
Reference in New Issue
Block a user