mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Moves JNI internal utility methods to frc namespace (#310)
This commit is contained in:
committed by
Peter Johnson
parent
137b3d81fb
commit
81221c4874
@@ -15,6 +15,8 @@
|
||||
#include "HALUtil.h"
|
||||
#include "HAL/handles/HandlesInternal.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
// set the logging level
|
||||
TLogLevel analogGyroJNILogLevel = logWARNING;
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "HALUtil.h"
|
||||
#include "HAL/handles/HandlesInternal.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
// set the logging level
|
||||
TLogLevel analogJNILogLevel = logWARNING;
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#include "HAL/CAN.h"
|
||||
#include "HALUtil.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
// set the logging level
|
||||
// TLogLevel canJNILogLevel = logDEBUG;
|
||||
TLogLevel canJNILogLevel = logERROR;
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "HAL/cpp/Log.h"
|
||||
#include "edu_wpi_first_wpilibj_hal_CompressorJNI.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
extern "C" {
|
||||
|
||||
/*
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include "HAL/Constants.h"
|
||||
#include "HALUtil.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
// set the logging level
|
||||
TLogLevel constantsJNILogLevel = logWARNING;
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#include "HAL/Errors.h"
|
||||
#include "HALUtil.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
// set the logging level
|
||||
TLogLevel counterJNILogLevel = logWARNING;
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#include "HAL/Ports.h"
|
||||
#include "HAL/handles/HandlesInternal.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
// set the logging level
|
||||
TLogLevel dioJNILogLevel = logWARNING;
|
||||
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
|
||||
#include "edu_wpi_first_wpilibj_hal_DigitalGlitchFilterJNI.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_wpilibj_hal_DigitalGlitchFilterJNI
|
||||
* Method: setFilterSelect
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#include "HAL/Errors.h"
|
||||
#include "HALUtil.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
// set the logging level
|
||||
TLogLevel encoderJNILogLevel = logWARNING;
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#include "edu_wpi_first_wpilibj_hal_HAL.h"
|
||||
#include "HALUtil.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
// set the logging level
|
||||
static TLogLevel netCommLogLevel = logWARNING;
|
||||
|
||||
|
||||
@@ -50,6 +50,8 @@ static jclass canNotInitializedExCls = nullptr;
|
||||
static jclass uncleanStatusExCls = nullptr;
|
||||
static jclass pwmConfigDataResultCls = nullptr;
|
||||
|
||||
namespace frc {
|
||||
|
||||
static void GetStackTrace(JNIEnv *env, std::string &res, std::string &func) {
|
||||
// create a throwable
|
||||
static jmethodID constructorId = nullptr;
|
||||
@@ -269,6 +271,10 @@ jobject CreatePWMConfigDataResult(JNIEnv *env, int32_t maxPwm,
|
||||
minPwm);
|
||||
}
|
||||
|
||||
} // namespace frc
|
||||
|
||||
using namespace frc;
|
||||
|
||||
extern "C" {
|
||||
|
||||
//
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
extern JavaVM *jvm;
|
||||
|
||||
namespace frc {
|
||||
|
||||
void ReportError(JNIEnv *env, int32_t status, bool do_throw = true);
|
||||
|
||||
void ThrowError(JNIEnv *env, int32_t status, int32_t minRange, int32_t maxRange,
|
||||
@@ -49,5 +51,7 @@ void ThrowBoundaryException(JNIEnv *env, double value, double lower,
|
||||
jobject CreatePWMConfigDataResult(JNIEnv *env, int32_t maxPwm,
|
||||
int32_t deadbandMaxPwm, int32_t centerPwm,
|
||||
int32_t deadbandMinPwm, int32_t minPwm);
|
||||
|
||||
} // namespace frc
|
||||
|
||||
#endif // HALUTIL_H
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include "HAL/I2C.h"
|
||||
#include "HALUtil.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
// set the logging level
|
||||
TLogLevel i2cJNILogLevel = logWARNING;
|
||||
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include "edu_wpi_first_wpilibj_hal_InterruptJNI.h"
|
||||
#include "support/SafeThread.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
TLogLevel interruptJNILogLevel = logERROR;
|
||||
|
||||
#define INTERRUPTJNI_LOG(level) \
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "edu_wpi_first_wpilibj_hal_NotifierJNI.h"
|
||||
#include "support/SafeThread.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
// set the logging level
|
||||
TLogLevel notifierJNILogLevel = logWARNING;
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "HALUtil.h"
|
||||
#include "edu_wpi_first_wpilibj_hal_PDPJNI.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
extern "C" {
|
||||
|
||||
/*
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#include "HALUtil.h"
|
||||
#include "HAL/handles/HandlesInternal.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
// set the logging level
|
||||
TLogLevel pwmJNILogLevel = logWARNING;
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include "HAL/Ports.h"
|
||||
#include "HALUtil.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
// set the logging level
|
||||
TLogLevel portsJNILogLevel = logWARNING;
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
#include "HALUtil.h"
|
||||
#include "edu_wpi_first_wpilibj_hal_PowerJNI.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
extern "C" {
|
||||
|
||||
/*
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
#include "HALUtil.h"
|
||||
#include "HAL/handles/HandlesInternal.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
// set the logging level
|
||||
TLogLevel relayJNILogLevel = logWARNING;
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include "HAL/SPI.h"
|
||||
#include "HALUtil.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
// set the logging level
|
||||
TLogLevel spiJNILogLevel = logWARNING;
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
#include "HAL/SerialPort.h"
|
||||
#include "HALUtil.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
// set the logging level
|
||||
TLogLevel serialJNILogLevel = logWARNING;
|
||||
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
#include "HALUtil.h"
|
||||
|
||||
using namespace frc;
|
||||
|
||||
TLogLevel solenoidJNILogLevel = logERROR;
|
||||
|
||||
#define SOLENOIDJNI_LOG(level) \
|
||||
|
||||
Reference in New Issue
Block a user