mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Consistently name property max/min functions and add step/default.
This commit is contained in:
@@ -160,28 +160,56 @@ JNIEXPORT void JNICALL Java_edu_wpi_cameraserver_CameraServerJNI_setDoubleProper
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_cameraserver_CameraServerJNI
|
||||
* Method: getDoublePropertyMin
|
||||
* Method: getPropertyMin
|
||||
* Signature: (I)D
|
||||
*/
|
||||
JNIEXPORT jdouble JNICALL Java_edu_wpi_cameraserver_CameraServerJNI_getDoublePropertyMin
|
||||
JNIEXPORT jdouble JNICALL Java_edu_wpi_cameraserver_CameraServerJNI_getPropertyMin
|
||||
(JNIEnv *env, jclass, jint property)
|
||||
{
|
||||
CS_Status status;
|
||||
auto val = cs::GetDoublePropertyMin(property, &status);
|
||||
auto val = cs::GetPropertyMin(property, &status);
|
||||
CheckStatus(env, status);
|
||||
return val;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_cameraserver_CameraServerJNI
|
||||
* Method: getDoublePropertyMax
|
||||
* Method: getPropertyMax
|
||||
* Signature: (I)D
|
||||
*/
|
||||
JNIEXPORT jdouble JNICALL Java_edu_wpi_cameraserver_CameraServerJNI_getDoublePropertyMax
|
||||
JNIEXPORT jdouble JNICALL Java_edu_wpi_cameraserver_CameraServerJNI_getPropertyMax
|
||||
(JNIEnv *env, jclass, jint property)
|
||||
{
|
||||
CS_Status status;
|
||||
auto val = cs::GetDoublePropertyMax(property, &status);
|
||||
auto val = cs::GetPropertyMax(property, &status);
|
||||
CheckStatus(env, status);
|
||||
return val;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_cameraserver_CameraServerJNI
|
||||
* Method: getPropertyStep
|
||||
* Signature: (I)D
|
||||
*/
|
||||
JNIEXPORT jdouble JNICALL Java_edu_wpi_cameraserver_CameraServerJNI_getPropertyStep
|
||||
(JNIEnv *env, jclass, jint property)
|
||||
{
|
||||
CS_Status status;
|
||||
auto val = cs::GetPropertyStep(property, &status);
|
||||
CheckStatus(env, status);
|
||||
return val;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_cameraserver_CameraServerJNI
|
||||
* Method: getPropertyDefault
|
||||
* Signature: (I)D
|
||||
*/
|
||||
JNIEXPORT jdouble JNICALL Java_edu_wpi_cameraserver_CameraServerJNI_getPropertyDefault
|
||||
(JNIEnv *env, jclass, jint property)
|
||||
{
|
||||
CS_Status status;
|
||||
auto val = cs::GetPropertyDefault(property, &status);
|
||||
CheckStatus(env, status);
|
||||
return val;
|
||||
}
|
||||
|
||||
@@ -81,8 +81,10 @@ public class CameraServerJNI {
|
||||
public static native void setBooleanProperty(int property, boolean value);
|
||||
public static native double getDoubleProperty(int property);
|
||||
public static native void setDoubleProperty(int property, double value);
|
||||
public static native double getDoublePropertyMin(int property);
|
||||
public static native double getDoublePropertyMax(int property);
|
||||
public static native double getPropertyMin(int property);
|
||||
public static native double getPropertyMax(int property);
|
||||
public static native double getPropertyStep(int property);
|
||||
public static native double getPropertyDefault(int property);
|
||||
public static native String getStringProperty(int property);
|
||||
public static native void setStringProperty(int property, String value);
|
||||
public static native int getEnumProperty(int property);
|
||||
|
||||
@@ -70,11 +70,19 @@ public class VideoProperty {
|
||||
}
|
||||
|
||||
public double getMin() {
|
||||
return CameraServerJNI.getDoublePropertyMin(m_handle);
|
||||
return CameraServerJNI.getPropertyMin(m_handle);
|
||||
}
|
||||
|
||||
public double getMax() {
|
||||
return CameraServerJNI.getDoublePropertyMax(m_handle);
|
||||
return CameraServerJNI.getPropertyMax(m_handle);
|
||||
}
|
||||
|
||||
public double getStep() {
|
||||
return CameraServerJNI.getPropertyStep(m_handle);
|
||||
}
|
||||
|
||||
public double getDefault() {
|
||||
return CameraServerJNI.getPropertyDefault(m_handle);
|
||||
}
|
||||
|
||||
// String-specific functions
|
||||
|
||||
Reference in New Issue
Block a user