mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
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:
committed by
Brad Miller (WPI)
parent
84ca2ab0f5
commit
906fe65e39
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user