|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||||
|
|||||
|
Missing DIO JNI Implementation
Today I was attempting to do some simple testing of a cheap ultrasonic sensor on the roboRio and I encountered an error I've never seen before on the RIOs.
The code involved sending a pulse out on a digital output, waiting, and receiving a pulse back from the sensor on a different pin. Bringing in our controls people to look at it, we found that this error message is generated on call to the pulse method of a DigitalOutput: Quote:
Code:
/*
* Class: edu_wpi_first_wpilibj_hal_DIOJNI
* Method: pulse
* Signature: (Ljava/nio/ByteBuffer;DLjava/nio/IntBuffer;)V
*/
JNIEXPORT void JNICALL Java_edu_wpi_first_wpilibj_hal_DIOJNI_pulse
(JNIEnv *, jclass, jobject, jdouble, jobject)
{
assert(false);
}
|
|
#2
|
||||||
|
||||||
|
Re: Missing DIO JNI Implementation
Bugs can be reported at the location linked here: http://wpilib.screenstepslive.com/s/...port-resources
|
|
#3
|
|||
|
|||
|
Thanks for bringing this to our attention, apparently we missed a few functions for the JNI bindings. We'll have a fix in for the next release.
|
|
#4
|
|||
|
|||
|
Re: Missing DIO JNI Implementation
Quote:
Quote:
Thanks, Ron - Team #2607 controls mentor |
|
#5
|
|||
|
|||
|
Re: Missing DIO JNI Implementation
We performed a very quick test of our patched library this morning, and at least the DO pulse method works.....so now the Ultrasonic class also works.
I've attached the patched DIOJNI.cpp source file to the Teamforge bug report for review. In case any other teams out there need this library working before the official wpilibj update is issued, attached is our unofficial updated library. To use it in a robot program, just unzip and use the JDK jar utility to update your robot jar file (FRCUserProgram.jar) to replace the original JNI library with the attached updated library. Easier than fiddling with the any build scripts. - Ron Team #2607 controls mentor |
|
#6
|
|||
|
|||
|
Re: Missing DIO JNI Implementation
We ran into this problem as well. Where can I go to download the official release? How do I install once I get it?
|
|
#7
|
|||
|
|||
|
Re: Missing DIO JNI Implementation
Ok, so I figured out that I can replace the libwpilibJavaJNI.so file inside of <home>wpilib\java\current\lib\WPILib.jar with the .so file attached to this thread. This way every time I build the distribution jar (FRCUserProgram.jar), the new .so is there.
However, I still haven't figured out where I can find new 'official' releases of WPILib.jar |
|
#8
|
|||
|
|||
|
Re: Missing DIO JNI Implementation
Alright, sorry for all the chatter here, but I think I just figured it out. Updating the eclipse plugin seemed to update my wpilib jar. (Inside eclipse go to Help -> Check for updates.)
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|