JNI for test coverage #3965

This commit is contained in:
rusefillc 2022-03-14 22:49:19 -04:00
parent 17ecdb356c
commit b080240132
1 changed files with 8 additions and 0 deletions

View File

@ -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);
}
}