mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
Add multi PDP getter and sim PCM/PDP multi arg functions (#2014)
This commit is contained in:
committed by
Peter Johnson
parent
931b8ceefd
commit
2ad15cae19
@@ -1,5 +1,5 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
|
||||
/* Copyright (c) 2016-2019 FIRST. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
||||
/* the project. */
|
||||
@@ -98,6 +98,25 @@ Java_edu_wpi_first_hal_PDPJNI_getPDPChannelCurrent
|
||||
return current;
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_PDPJNI
|
||||
* Method: getPDPAllCurrents
|
||||
* Signature: (I[D)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL
|
||||
Java_edu_wpi_first_hal_PDPJNI_getPDPAllCurrents
|
||||
(JNIEnv* env, jclass, jint handle, jdoubleArray jarr)
|
||||
{
|
||||
double storage[16];
|
||||
int32_t status = 0;
|
||||
HAL_GetPDPAllChannelCurrents(handle, storage, &status);
|
||||
if (!CheckStatus(env, status, false)) {
|
||||
return;
|
||||
}
|
||||
|
||||
env->SetDoubleArrayRegion(jarr, 0, 16, storage);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: edu_wpi_first_hal_PDPJNI
|
||||
* Method: getPDPTotalCurrent
|
||||
|
||||
Reference in New Issue
Block a user