Target AFR table Y axis stuck at 0 #4826

sweet coverage :)
This commit is contained in:
Andrey 2022-11-26 20:22:40 -05:00
parent 704f6a8318
commit 638c7fdc6d
3 changed files with 3 additions and 4 deletions

View File

@ -143,7 +143,7 @@ const electronic_throttle_s* getLiveDataAddr(size_t) {
#if EFI_UNIT_TEST #if EFI_UNIT_TEST
FragmentList getLiveDataFragments() { FragmentList getLiveDataFragments() {
// todo: would same runtime be optimized into static during firmware build? // todo: would same runtime be optimized into static during firmware build?
FragmentEntry fragments[] = { static FragmentEntry fragments[] = {
// This header is generated - do not edit by hand! // This header is generated - do not edit by hand!
#include "live_data_fragments.h" #include "live_data_fragments.h"
}; };

View File

@ -27,8 +27,7 @@ public class JniUnitTest {
assertEquals(TS_FILE_VERSION, (int) getValue(engineLogic.getOutputs(), Sensor.FIRMWARE_VERSION)); assertEquals(TS_FILE_VERSION, (int) getValue(engineLogic.getOutputs(), Sensor.FIRMWARE_VERSION));
// huh? assertEquals(14.0, getValue(engineLogic.getOutputs(), Sensor.afrTarget)); assertEquals(14.0, getValue(engineLogic.getOutputs(), Sensor.afrTarget));
assertEquals(0.0, getValue(engineLogic.getOutputs(), Sensor.afrTarget));
double veValue = getValue(engineLogic.getOutputs(), Sensor.veValue); double veValue = getValue(engineLogic.getOutputs(), Sensor.veValue);
assertTrue("veValue", veValue > 40 && veValue < 90); assertTrue("veValue", veValue > 40 && veValue < 90);

View File

@ -80,7 +80,7 @@ JNIEXPORT jbyteArray JNICALL Java_com_rusefi_native_1_EngineLogic_getOutputs(JNI
jbyte *buf = env->GetByteArrayElements(retVal, NULL); jbyte *buf = env->GetByteArrayElements(retVal, NULL);
EngineTestHelper* eth = getEth(); EngineTestHelper* eth = getEth();
updateTunerStudioState(); updateTunerStudioState();
memcpy(buf, (const void*)&eth->engine.outputChannels, sizeof(TunerStudioOutputChannels)); copyRange((uint8_t*)buf, getLiveDataFragments(), 0, TS_TOTAL_OUTPUT_SIZE);
env->ReleaseByteArrayElements(retVal, buf, 0); env->ReleaseByteArrayElements(retVal, buf, 0);
return retVal; return retVal;