mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Add format script which invokes clang-format on the C++ source code (#41)
On Windows machines, clang-format.exe must be in the PATH environment variable.
This commit is contained in:
committed by
Peter Johnson
parent
68690643d2
commit
e14e45da76
@@ -5,8 +5,8 @@
|
||||
/* the project. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
#include <jni.h>
|
||||
#include <assert.h>
|
||||
#include <jni.h>
|
||||
#include "Log.hpp"
|
||||
|
||||
#include "edu_wpi_first_wpilibj_hal_JNIWrapper.h"
|
||||
@@ -20,15 +20,15 @@ extern "C" {
|
||||
* Method: getPortWithModule
|
||||
* Signature: (BB)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_edu_wpi_first_wpilibj_hal_JNIWrapper_getPortWithModule
|
||||
(JNIEnv * env, jclass, jbyte module, jbyte pin)
|
||||
{
|
||||
//FILE_LOG(logDEBUG) << "Calling JNIWrapper getPortWithModlue";
|
||||
//FILE_LOG(logDEBUG) << "Module = " << (jint)module;
|
||||
//FILE_LOG(logDEBUG) << "Pin = " << (jint)pin;
|
||||
void* port = getPortWithModule(module, pin);
|
||||
//FILE_LOG(logDEBUG) << "Port Ptr = " << port;
|
||||
return (jlong)port;
|
||||
JNIEXPORT jlong JNICALL
|
||||
Java_edu_wpi_first_wpilibj_hal_JNIWrapper_getPortWithModule(
|
||||
JNIEnv* env, jclass, jbyte module, jbyte pin) {
|
||||
// FILE_LOG(logDEBUG) << "Calling JNIWrapper getPortWithModlue";
|
||||
// FILE_LOG(logDEBUG) << "Module = " << (jint)module;
|
||||
// FILE_LOG(logDEBUG) << "Pin = " << (jint)pin;
|
||||
void* port = getPortWithModule(module, pin);
|
||||
// FILE_LOG(logDEBUG) << "Port Ptr = " << port;
|
||||
return (jlong)port;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -36,15 +36,14 @@ JNIEXPORT jlong JNICALL Java_edu_wpi_first_wpilibj_hal_JNIWrapper_getPortWithMod
|
||||
* Method: getPort
|
||||
* Signature: (BB)J
|
||||
*/
|
||||
JNIEXPORT jlong JNICALL Java_edu_wpi_first_wpilibj_hal_JNIWrapper_getPort
|
||||
(JNIEnv * env, jclass, jbyte pin)
|
||||
{
|
||||
//FILE_LOG(logDEBUG) << "Calling JNIWrapper getPortWithModlue";
|
||||
//FILE_LOG(logDEBUG) << "Module = " << (jint)module;
|
||||
//FILE_LOG(logDEBUG) << "Pin = " << (jint)pin;
|
||||
void* port = getPort(pin);
|
||||
//FILE_LOG(logDEBUG) << "Port Ptr = " << port;
|
||||
return (jlong)port;
|
||||
JNIEXPORT jlong JNICALL Java_edu_wpi_first_wpilibj_hal_JNIWrapper_getPort(
|
||||
JNIEnv* env, jclass, jbyte pin) {
|
||||
// FILE_LOG(logDEBUG) << "Calling JNIWrapper getPortWithModlue";
|
||||
// FILE_LOG(logDEBUG) << "Module = " << (jint)module;
|
||||
// FILE_LOG(logDEBUG) << "Pin = " << (jint)pin;
|
||||
void* port = getPort(pin);
|
||||
// FILE_LOG(logDEBUG) << "Port Ptr = " << port;
|
||||
return (jlong)port;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -52,14 +51,13 @@ JNIEXPORT jlong JNICALL Java_edu_wpi_first_wpilibj_hal_JNIWrapper_getPort
|
||||
* Method: freePort
|
||||
* Signature: (J)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_JNIWrapper_freePort
|
||||
(JNIEnv * env, jclass, jlong id)
|
||||
{
|
||||
//FILE_LOG(logDEBUG) << "Calling JNIWrapper getPortWithModlue";
|
||||
//FILE_LOG(logDEBUG) << "Module = " << (jint)module;
|
||||
//FILE_LOG(logDEBUG) << "Pin = " << (jint)pin;
|
||||
freePort((void*)id);
|
||||
//FILE_LOG(logDEBUG) << "Port Ptr = " << port;
|
||||
JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_JNIWrapper_freePort(
|
||||
JNIEnv* env, jclass, jlong id) {
|
||||
// FILE_LOG(logDEBUG) << "Calling JNIWrapper getPortWithModlue";
|
||||
// FILE_LOG(logDEBUG) << "Module = " << (jint)module;
|
||||
// FILE_LOG(logDEBUG) << "Pin = " << (jint)pin;
|
||||
freePort((void*)id);
|
||||
// FILE_LOG(logDEBUG) << "Port Ptr = " << port;
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
Reference in New Issue
Block a user