mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
WPILib Reorganization
This is a major restructuring of the WPILib repository to simply build procedures and remove the remnants of Maven from everything except the eclipse plugins. Gradle files have been largely simplified or rewritten, taking advantage of splitting up parts of the build into separate build files for ease of reading. The eclipse plugins are now in a separate project, as is ntcore. All dependencies are resolved via Maven dependencies, with the Jenkins-maintained WPILib repo. Project structures have also been simplified: we no longer have separate subprojects inside wpilibc and wpilibj. Where possible, these changes hav been done with git renames, to make sure we still have full history for all repositories. Other unrelated subprojects have also been broken out: OutlineViewer is now a separate project. Change-Id: Ib4e2a6e1a2f66427a14f16612b0e0d69ed661878
This commit is contained in:
197
wpilibj/src/athena/cpp/lib/CompressorJNI.cpp
Normal file
197
wpilibj/src/athena/cpp/lib/CompressorJNI.cpp
Normal file
@@ -0,0 +1,197 @@
|
||||
#include "Log.hpp"
|
||||
#include "edu_wpi_first_wpilibj_hal_CompressorJNI.h"
|
||||
#include "HAL/HAL.hpp"
|
||||
#include "HALUtil.h"
|
||||
|
||||
extern "C" {
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_CompressorJNI
|
||||
* Method: initializeCompressor
|
||||
* Signature: (B)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_edu_wpi_first_wpilibj_hal_CompressorJNI_initializeCompressor
|
||||
(JNIEnv *env, jclass, jbyte module)
|
||||
{
|
||||
void* pcm = initializeCompressor(module);
|
||||
return (jlong)pcm;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_CompressorJNI
|
||||
* Method: checkCompressorModule
|
||||
* Signature: (B)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_CompressorJNI_checkCompressorModule
|
||||
(JNIEnv *env, jclass, jbyte module)
|
||||
{
|
||||
return checkCompressorModule(module);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_CompressorJNI
|
||||
* Method: getCompressor
|
||||
* Signature: (J)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_CompressorJNI_getCompressor
|
||||
(JNIEnv *env, jclass, jlong pcm_pointer)
|
||||
{
|
||||
int32_t status = 0;
|
||||
bool val = getCompressor((void*)pcm_pointer, &status);
|
||||
CheckStatus(env, status);
|
||||
return val;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_CompressorJNI
|
||||
* Method: setClosedLoopControl
|
||||
* Signature: (JZ)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_CompressorJNI_setClosedLoopControl
|
||||
(JNIEnv *env, jclass, jlong pcm_pointer, jboolean value)
|
||||
{
|
||||
int32_t status = 0;
|
||||
setClosedLoopControl((void*)pcm_pointer, value, &status);
|
||||
CheckStatus(env, status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_CompressorJNI
|
||||
* Method: getClosedLoopControl
|
||||
* Signature: (J)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_CompressorJNI_getClosedLoopControl
|
||||
(JNIEnv *env, jclass, jlong pcm_pointer)
|
||||
{
|
||||
int32_t status = 0;
|
||||
bool val = getClosedLoopControl((void*)pcm_pointer, &status);
|
||||
CheckStatus(env, status);
|
||||
return val;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_CompressorJNI
|
||||
* Method: getPressureSwitch
|
||||
* Signature: (J)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_CompressorJNI_getPressureSwitch
|
||||
(JNIEnv *env, jclass, jlong pcm_pointer)
|
||||
{
|
||||
int32_t status = 0;
|
||||
bool val = getPressureSwitch((void*)pcm_pointer, &status);
|
||||
CheckStatus(env, status);
|
||||
return val;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_CompressorJNI
|
||||
* Method: getCompressorCurrent
|
||||
* Signature: (J)F
|
||||
*/
|
||||
JNIEXPORT jfloat JNICALL Java_edu_wpi_first_wpilibj_hal_CompressorJNI_getCompressorCurrent
|
||||
(JNIEnv *env, jclass, jlong pcm_pointer)
|
||||
{
|
||||
int32_t status = 0;
|
||||
float val = getCompressorCurrent((void*)pcm_pointer, &status);
|
||||
CheckStatus(env, status);
|
||||
return val;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_CompressorJNI
|
||||
* Method: getCompressorCurrentTooHighFault
|
||||
* Signature: (J)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_CompressorJNI_getCompressorCurrentTooHighFault
|
||||
(JNIEnv *env, jclass, jlong pcm_pointer)
|
||||
{
|
||||
int32_t status = 0;
|
||||
bool val = getCompressorCurrentTooHighFault((void*)pcm_pointer, &status);
|
||||
CheckStatus(env, status);
|
||||
return val;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_CompressorJNI
|
||||
* Method: getCompressorCurrentTooHighStickyFault
|
||||
* Signature: (J)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_CompressorJNI_getCompressorCurrentTooHighStickyFault
|
||||
(JNIEnv *env, jclass, jlong pcm_pointer)
|
||||
{
|
||||
int32_t status = 0;
|
||||
bool val = getCompressorCurrentTooHighStickyFault((void*)pcm_pointer, &status);
|
||||
CheckStatus(env, status);
|
||||
return val;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_CompressorJNI
|
||||
* Method: getCompressorShortedStickyFault
|
||||
* Signature: (J)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_CompressorJNI_getCompressorShortedStickyFault
|
||||
(JNIEnv *env, jclass, jlong pcm_pointer)
|
||||
{
|
||||
int32_t status = 0;
|
||||
bool val = getCompressorShortedStickyFault((void*)pcm_pointer, &status);
|
||||
CheckStatus(env, status);
|
||||
return val;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_CompressorJNI
|
||||
* Method: getCompressorShortedFault
|
||||
* Signature: (J)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_CompressorJNI_getCompressorShortedFault
|
||||
(JNIEnv *env, jclass, jlong pcm_pointer)
|
||||
{
|
||||
int32_t status = 0;
|
||||
bool val = getCompressorShortedFault((void*)pcm_pointer, &status);
|
||||
CheckStatus(env, status);
|
||||
return val;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_CompressorJNI
|
||||
* Method: getCompressorNotConnectedStickyFault
|
||||
* Signature: (J)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_CompressorJNI_getCompressorNotConnectedStickyFault
|
||||
(JNIEnv *env, jclass, jlong pcm_pointer)
|
||||
{
|
||||
int32_t status = 0;
|
||||
bool val = getCompressorNotConnectedStickyFault((void*)pcm_pointer, &status);
|
||||
CheckStatus(env, status);
|
||||
return val;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_CompressorJNI
|
||||
* Method: getCompressorNotConnectedFault
|
||||
* Signature: (J)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_CompressorJNI_getCompressorNotConnectedFault
|
||||
(JNIEnv *env, jclass, jlong pcm_pointer)
|
||||
{
|
||||
int32_t status = 0;
|
||||
bool val = getCompressorNotConnectedFault((void*)pcm_pointer, &status);
|
||||
CheckStatus(env, status);
|
||||
return val;
|
||||
}
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_CompressorJNI
|
||||
* Method: clearAllPCMStickyFaults
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_CompressorJNI_clearAllPCMStickyFaults
|
||||
(JNIEnv *env, jclass, jlong pcm_pointer)
|
||||
{
|
||||
int32_t status = 0;
|
||||
clearAllPCMStickyFaults((void*)pcm_pointer, &status);
|
||||
CheckStatus(env, status);
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
Reference in New Issue
Block a user