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:
|
java: /Users/brad/allwpilib/wpilibj/wpilibJavaJNI/lib/DIOJNI.cpp:130: void Java_edu_wpi_first_wpilibj_hal_DIOJNI_pulse(JNIEnv *, jclass, jobject, jdouble, jobject): Assertion `false' failed.
|
The next obvious step was to check out the source file of DIOJNI.cpp, and well, we found something interesting:
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);
}
Now I'm not a doctor, but comparing that to the other methods in DIOJNI.cpp, it seems like the implementation is missing. Is there a WPILIB update for this?