JNI for test coverage #3965
This commit is contained in:
parent
17ecdb356c
commit
b080240132
|
@ -1,7 +1,10 @@
|
|||
package com.rusefi.native_;
|
||||
|
||||
import com.rusefi.core.Sensor;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import static junit.framework.Assert.assertTrue;
|
||||
|
||||
public class JniUnitTest {
|
||||
|
@ -16,5 +19,10 @@ public class JniUnitTest {
|
|||
engineLogic.invokePeriodicCallback();
|
||||
|
||||
byte[] outputs = engineLogic.getOutputs();
|
||||
|
||||
Sensor sensor = Sensor.FIRMWARE_VERSION;
|
||||
ByteBuffer bb = ByteBuffer.wrap(outputs, sensor.getOffset(), 4);
|
||||
double value = sensor.getValueForChannel(bb);
|
||||
System.out.println(value);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue