mirror of https://github.com/FOME-Tech/fome-fw.git
JNI for test coverage #3965
This commit is contained in:
parent
2dbadfd283
commit
8c2f6888d7
|
@ -56,4 +56,15 @@ JNIEXPORT void JNICALL Java_com_rusefi_native_1_EngineLogic_invokePeriodicCallba
|
||||||
(JNIEnv *, jobject) {
|
(JNIEnv *, jobject) {
|
||||||
|
|
||||||
EngineTestHelper* eth = getEth();
|
EngineTestHelper* eth = getEth();
|
||||||
|
eth->engine.periodicSlowCallback();
|
||||||
|
eth->engine.periodicFastCallback();
|
||||||
|
}
|
||||||
|
|
||||||
|
JNIEXPORT jbyteArray JNICALL Java_com_rusefi_native_1_EngineLogic_getOutputs(JNIEnv * env, jobject instance) {
|
||||||
|
jbyteArray retVal = env->NewByteArray(sizeof(TunerStudioOutputChannels));
|
||||||
|
jbyte *buf = env->GetByteArrayElements(retVal, NULL);
|
||||||
|
memcpy(buf, (const void*)ð->engine.outputChannels, sizeof(TunerStudioOutputChannels));
|
||||||
|
env->ReleaseByteArrayElements(retVal, buf, 0);
|
||||||
|
|
||||||
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue