Moves Encoders to Handles and Moves WPILib Encoders to HAL (#124)

This commit is contained in:
Thad House
2016-07-03 15:22:22 -07:00
committed by Peter Johnson
parent b45e0917ae
commit 36ac37db8c
20 changed files with 1409 additions and 598 deletions

View File

@@ -37,9 +37,9 @@ Java_edu_wpi_first_wpilibj_hal_CounterJNI_initializeCounter(
COUNTERJNI_LOG(logDEBUG) << "Calling COUNTERJNI initializeCounter";
COUNTERJNI_LOG(logDEBUG) << "Mode = " << mode;
jint* indexPtr = (jint*)env->GetDirectBufferAddress(index);
COUNTERJNI_LOG(logDEBUG) << "Index Ptr = " << (uint32_t*)indexPtr;
COUNTERJNI_LOG(logDEBUG) << "Index Ptr = " << (int32_t*)indexPtr;
int32_t status = 0;
auto counter = initializeCounter((Mode)mode, (uint32_t*)indexPtr, &status);
auto counter = initializeCounter((Mode)mode, (int32_t*)indexPtr, &status);
COUNTERJNI_LOG(logDEBUG) << "Index = " << *indexPtr;
COUNTERJNI_LOG(logDEBUG) << "Status = " << status;
COUNTERJNI_LOG(logDEBUG) << "COUNTER Handle = " << counter;