Optimize Solenoid Gets. Fixes artf4730.

Implement GetAllSolenoids in the HAL so that SolenoidBase doesn't have to
read each solenoid individually.

Change-Id: I85559565949f7a7119ead410187235636a63f0ed
This commit is contained in:
Joe Ross
2015-11-15 10:46:18 -08:00
committed by Brad Miller (WPI)
parent 84ca2ab0f5
commit 906fe65e39
8 changed files with 53 additions and 10 deletions

View File

@@ -99,6 +99,20 @@ JNIEXPORT jboolean JNICALL Java_edu_wpi_first_wpilibj_hal_SolenoidJNI_getSolenoi
return val;
}
/*
* Class: edu_wpi_first_wpilibj_hal_SolenoidJNI
* Method: getAllSolenoids
* Signature: (J)Z
*/
JNIEXPORT jbyte JNICALL Java_edu_wpi_first_wpilibj_hal_SolenoidJNI_getAllSolenoids
(JNIEnv *env, jclass, jlong solenoid_port)
{
int32_t status = 0;
jbyte val = getAllSolenoids((void*)solenoid_port, &status);
CheckStatus(env, status);
return val;
}
/*
* Class: edu_wpi_first_wpilibj_hal_SolenoidJNI
* Method: getPCMSolenoidBlackList