parent
30d3effc69
commit
5b24fd14b8
|
@ -143,7 +143,7 @@ const electronic_throttle_s* getLiveDataAddr(size_t) {
|
|||
#if EFI_UNIT_TEST
|
||||
FragmentList getLiveDataFragments() {
|
||||
// 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!
|
||||
#include "live_data_fragments.h"
|
||||
};
|
||||
|
|
|
@ -27,8 +27,7 @@ public class JniUnitTest {
|
|||
|
||||
assertEquals(TS_FILE_VERSION, (int) getValue(engineLogic.getOutputs(), Sensor.FIRMWARE_VERSION));
|
||||
|
||||
// huh? assertEquals(14.0, getValue(engineLogic.getOutputs(), Sensor.afrTarget));
|
||||
assertEquals(0.0, getValue(engineLogic.getOutputs(), Sensor.afrTarget));
|
||||
assertEquals(14.0, getValue(engineLogic.getOutputs(), Sensor.afrTarget));
|
||||
|
||||
double veValue = getValue(engineLogic.getOutputs(), Sensor.veValue);
|
||||
assertTrue("veValue", veValue > 40 && veValue < 90);
|
||||
|
@ -41,6 +40,8 @@ public class JniUnitTest {
|
|||
|
||||
assertEquals(18.11, getValue(engineLogic.getOutputs(), Sensor.runningFuel));
|
||||
|
||||
assertEquals(0.25096, getValue(engineLogic.getOutputs(), Sensor.sdAirMassInOneCylinder), 0.0001);
|
||||
|
||||
engineLogic.setEngineType(engine_type_e_MRE_MIATA_NB2_MAP);
|
||||
assertEquals(2.45, getField(engineLogic, Fields.GEARRATIO1));
|
||||
}
|
||||
|
|
|
@ -94,6 +94,7 @@ public enum Sensor implements BinaryLogEntry {
|
|||
|
||||
// Fuel system
|
||||
afrTarget(GAUGE_NAME_TARGET_AFR, SensorCategory.FUEL, FieldType.INT16, FuelComputer.TARGETAFR, 1.0 / 1000, 0, 20, ""),
|
||||
sdAirMassInOneCylinder(GAUGE_NAME_FUEL_RUNNING, SensorCategory.FUEL, FieldType.FLOAT, FuelComputer.SDAIRMASSINONECYLINDER, 1.0, 0, 15, "g"),
|
||||
|
||||
// Knock
|
||||
// knockLevel(GAUGE_NAME_KNOCK_LEVEL, SensorCategory.DEBUG, FieldType.FLOAT, 108, 0, 5),
|
||||
|
|
|
@ -80,7 +80,7 @@ JNIEXPORT jbyteArray JNICALL Java_com_rusefi_native_1_EngineLogic_getOutputs(JNI
|
|||
jbyte *buf = env->GetByteArrayElements(retVal, NULL);
|
||||
EngineTestHelper* eth = getEth();
|
||||
updateTunerStudioState();
|
||||
memcpy(buf, (const void*)ð->engine.outputChannels, sizeof(TunerStudioOutputChannels));
|
||||
copyRange((uint8_t*)buf, getLiveDataFragments(), 0, TS_TOTAL_OUTPUT_SIZE);
|
||||
env->ReleaseByteArrayElements(retVal, buf, 0);
|
||||
|
||||
return retVal;
|
||||
|
|
Loading…
Reference in New Issue