Target AFR table Y axis stuck at 0 #4826

integrated coverage is needed
This commit is contained in:
rusefillc 2022-11-26 00:30:48 -05:00
parent 6ac9b13b44
commit 2c7804e483
13 changed files with 90 additions and 90 deletions

View File

@ -1,6 +1,6 @@
//DO NOT EDIT MANUALLY, let automation work hard.
// auto-generated by PinoutLogic.java based on config/boards/hellen/alphax-2chan/connectors/main.yaml
// auto-generated by PinoutLogic.java based on config\boards\hellen\alphax-2chan\connectors\main.yaml
#include "pch.h"
// see comments at declaration in pin_repository.h

View File

@ -1,15 +1,15 @@
package com.rusefi.config.generated;
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/algo/ignition_state.txt Mon Aug 15 21:21:43 UTC 2022
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/algo\ignition_state.txt Sat Nov 26 00:29:02 EST 2022
// by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*;
public class IgnitionState {
public static final Field BASEDWELL = Field.create("BASEDWELL", 0, FieldType.FLOAT);
public static final Field DWELLVOLTAGECORRECTION = Field.create("DWELLVOLTAGECORRECTION", 4, FieldType.FLOAT);
public static final Field LUATIMINGADD = Field.create("LUATIMINGADD", 8, FieldType.FLOAT);
public static final Field LUATIMINGMULT = Field.create("LUATIMINGMULT", 12, FieldType.FLOAT);
public static final Field BASEDWELL = Field.create("BASEDWELL", 0, FieldType.FLOAT).setBaseOffset(1200);
public static final Field DWELLVOLTAGECORRECTION = Field.create("DWELLVOLTAGECORRECTION", 4, FieldType.FLOAT).setBaseOffset(1200);
public static final Field LUATIMINGADD = Field.create("LUATIMINGADD", 8, FieldType.FLOAT).setBaseOffset(1200);
public static final Field LUATIMINGMULT = Field.create("LUATIMINGMULT", 12, FieldType.FLOAT).setBaseOffset(1200);
public static final Field[] VALUES = {
BASEDWELL,
DWELLVOLTAGECORRECTION,

View File

@ -1,14 +1,14 @@
package com.rusefi.config.generated;
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/algo/fuel/injector_model.txt Mon Aug 15 21:21:42 UTC 2022
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/algo/fuel\injector_model.txt Sat Nov 26 00:29:02 EST 2022
// by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*;
public class InjectorModel {
public static final Field M_DEADTIME = Field.create("M_DEADTIME", 0, FieldType.FLOAT);
public static final Field PRESSUREDELTA = Field.create("PRESSUREDELTA", 4, FieldType.FLOAT);
public static final Field PRESSURERATIO = Field.create("PRESSURERATIO", 8, FieldType.FLOAT);
public static final Field M_DEADTIME = Field.create("M_DEADTIME", 0, FieldType.FLOAT).setBaseOffset(788);
public static final Field PRESSUREDELTA = Field.create("PRESSUREDELTA", 4, FieldType.FLOAT).setBaseOffset(788);
public static final Field PRESSURERATIO = Field.create("PRESSURERATIO", 8, FieldType.FLOAT).setBaseOffset(788);
public static final Field[] VALUES = {
M_DEADTIME,
PRESSUREDELTA,

View File

@ -1,15 +1,15 @@
package com.rusefi.config.generated;
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/engine_cycle/knock_controller.txt Tue Aug 30 06:01:23 UTC 2022
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/engine_cycle\knock_controller.txt Sat Nov 26 00:29:02 EST 2022
// by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*;
public class KnockController {
public static final Field M_KNOCKRETARD = Field.create("M_KNOCKRETARD", 0, FieldType.FLOAT);
public static final Field M_KNOCKTHRESHOLD = Field.create("M_KNOCKTHRESHOLD", 4, FieldType.FLOAT);
public static final Field M_KNOCKCOUNT = Field.create("M_KNOCKCOUNT", 8, FieldType.INT).setScale(1.0);
public static final Field M_MAXIMUMRETARD = Field.create("M_MAXIMUMRETARD", 12, FieldType.FLOAT);
public static final Field M_KNOCKRETARD = Field.create("M_KNOCKRETARD", 0, FieldType.FLOAT).setBaseOffset(748);
public static final Field M_KNOCKTHRESHOLD = Field.create("M_KNOCKTHRESHOLD", 4, FieldType.FLOAT).setBaseOffset(748);
public static final Field M_KNOCKCOUNT = Field.create("M_KNOCKCOUNT", 8, FieldType.INT).setScale(1.0).setBaseOffset(748);
public static final Field M_MAXIMUMRETARD = Field.create("M_MAXIMUMRETARD", 12, FieldType.FLOAT).setBaseOffset(748);
public static final Field[] VALUES = {
M_KNOCKRETARD,
M_KNOCKTHRESHOLD,

View File

@ -1,26 +1,26 @@
package com.rusefi.config.generated;
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/trigger/trigger_central.txt Sat Sep 24 04:28:19 UTC 2022
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/trigger\trigger_central.txt Sat Nov 26 00:29:02 EST 2022
// by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*;
public class TriggerCentral {
public static final int HW_EVENT_TYPES = 6;
public static final Field HWEVENTCOUNTERS1 = Field.create("HWEVENTCOUNTERS1", 0, FieldType.INT).setScale(1.0);
public static final Field HWEVENTCOUNTERS2 = Field.create("HWEVENTCOUNTERS2", 4, FieldType.INT).setScale(1.0);
public static final Field HWEVENTCOUNTERS3 = Field.create("HWEVENTCOUNTERS3", 8, FieldType.INT).setScale(1.0);
public static final Field HWEVENTCOUNTERS4 = Field.create("HWEVENTCOUNTERS4", 12, FieldType.INT).setScale(1.0);
public static final Field HWEVENTCOUNTERS5 = Field.create("HWEVENTCOUNTERS5", 16, FieldType.INT).setScale(1.0);
public static final Field HWEVENTCOUNTERS6 = Field.create("HWEVENTCOUNTERS6", 20, FieldType.INT).setScale(1.0);
public static final Field VVTCAMCOUNTER = Field.create("VVTCAMCOUNTER", 24, FieldType.INT).setScale(1.0);
public static final Field MAPVVT_MAP_AT_SPECIAL_POINT = Field.create("MAPVVT_MAP_AT_SPECIAL_POINT", 28, FieldType.FLOAT);
public static final Field MAPVVT_MAP_AT_DIFF = Field.create("MAPVVT_MAP_AT_DIFF", 32, FieldType.FLOAT);
public static final Field MAPVVT_MAP_AT_CYCLE_COUNT = Field.create("MAPVVT_MAP_AT_CYCLE_COUNT", 36, FieldType.INT8).setScale(1.0);
public static final Field MAPVVT_MAP_PEAK = Field.create("MAPVVT_MAP_PEAK", 37, FieldType.INT8).setScale(1.0);
public static final Field ALIGNMENTFILL_AT_38 = Field.create("ALIGNMENTFILL_AT_38", 38, FieldType.INT8).setScale(1.0);
public static final Field CURRENTENGINEDECODEDPHASE = Field.create("CURRENTENGINEDECODEDPHASE", 40, FieldType.FLOAT);
public static final Field TRIGGERTOOTHANGLEERROR = Field.create("TRIGGERTOOTHANGLEERROR", 44, FieldType.FLOAT);
public static final Field HWEVENTCOUNTERS1 = Field.create("HWEVENTCOUNTERS1", 0, FieldType.INT).setScale(1.0).setBaseOffset(1076);
public static final Field HWEVENTCOUNTERS2 = Field.create("HWEVENTCOUNTERS2", 4, FieldType.INT).setScale(1.0).setBaseOffset(1076);
public static final Field HWEVENTCOUNTERS3 = Field.create("HWEVENTCOUNTERS3", 8, FieldType.INT).setScale(1.0).setBaseOffset(1076);
public static final Field HWEVENTCOUNTERS4 = Field.create("HWEVENTCOUNTERS4", 12, FieldType.INT).setScale(1.0).setBaseOffset(1076);
public static final Field HWEVENTCOUNTERS5 = Field.create("HWEVENTCOUNTERS5", 16, FieldType.INT).setScale(1.0).setBaseOffset(1076);
public static final Field HWEVENTCOUNTERS6 = Field.create("HWEVENTCOUNTERS6", 20, FieldType.INT).setScale(1.0).setBaseOffset(1076);
public static final Field VVTCAMCOUNTER = Field.create("VVTCAMCOUNTER", 24, FieldType.INT).setScale(1.0).setBaseOffset(1076);
public static final Field MAPVVT_MAP_AT_SPECIAL_POINT = Field.create("MAPVVT_MAP_AT_SPECIAL_POINT", 28, FieldType.FLOAT).setBaseOffset(1076);
public static final Field MAPVVT_MAP_AT_DIFF = Field.create("MAPVVT_MAP_AT_DIFF", 32, FieldType.FLOAT).setBaseOffset(1076);
public static final Field MAPVVT_MAP_AT_CYCLE_COUNT = Field.create("MAPVVT_MAP_AT_CYCLE_COUNT", 36, FieldType.INT8).setScale(1.0).setBaseOffset(1076);
public static final Field MAPVVT_MAP_PEAK = Field.create("MAPVVT_MAP_PEAK", 37, FieldType.INT8).setScale(1.0).setBaseOffset(1076);
public static final Field ALIGNMENTFILL_AT_38 = Field.create("ALIGNMENTFILL_AT_38", 38, FieldType.INT8).setScale(1.0).setBaseOffset(1076);
public static final Field CURRENTENGINEDECODEDPHASE = Field.create("CURRENTENGINEDECODEDPHASE", 40, FieldType.FLOAT).setBaseOffset(1076);
public static final Field TRIGGERTOOTHANGLEERROR = Field.create("TRIGGERTOOTHANGLEERROR", 44, FieldType.FLOAT).setBaseOffset(1076);
public static final Field[] VALUES = {
HWEVENTCOUNTERS1,
HWEVENTCOUNTERS2,

View File

@ -1,6 +1,6 @@
package com.rusefi.config.generated;
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/trigger/trigger_state.txt Thu Nov 24 03:15:51 UTC 2022
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/trigger\trigger_state.txt Sat Nov 26 00:29:02 EST 2022
// by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*;
@ -395,15 +395,15 @@ public class TriggerState {
public static final int VM_VVT_INACTIVE = 0;
public static final int VR_THRESHOLD_COUNT = 2;
public static final int WWAE_TABLE_SIZE = 8;
public static final Field CRANKSYNCHRONIZATIONCOUNTER = Field.create("CRANKSYNCHRONIZATIONCOUNTER", 0, FieldType.INT).setScale(1.0);
public static final Field VVTSYNCGAPRATIO = Field.create("VVTSYNCGAPRATIO", 4, FieldType.FLOAT);
public static final Field VVTCURRENTPOSITION = Field.create("VVTCURRENTPOSITION", 8, FieldType.FLOAT);
public static final Field TRIGGERSYNCGAPRATIO = Field.create("TRIGGERSYNCGAPRATIO", 12, FieldType.FLOAT);
public static final Field TRIGGERACTUALSYNCGAPRATIO = Field.create("TRIGGERACTUALSYNCGAPRATIO", 16, FieldType.FLOAT);
public static final Field TRIGGERSTATEINDEX = Field.create("TRIGGERSTATEINDEX", 20, FieldType.INT8).setScale(1.0);
public static final Field VVTCOUNTER = Field.create("VVTCOUNTER", 21, FieldType.INT8).setScale(1.0);
public static final Field CAMRESYNCCOUNTER = Field.create("CAMRESYNCCOUNTER", 22, FieldType.INT8).setScale(1.0);
public static final Field VVTSTATEINDEX = Field.create("VVTSTATEINDEX", 23, FieldType.INT8).setScale(1.0);
public static final Field CRANKSYNCHRONIZATIONCOUNTER = Field.create("CRANKSYNCHRONIZATIONCOUNTER", 0, FieldType.INT).setScale(1.0).setBaseOffset(1124);
public static final Field VVTSYNCGAPRATIO = Field.create("VVTSYNCGAPRATIO", 4, FieldType.FLOAT).setBaseOffset(1124);
public static final Field VVTCURRENTPOSITION = Field.create("VVTCURRENTPOSITION", 8, FieldType.FLOAT).setBaseOffset(1124);
public static final Field TRIGGERSYNCGAPRATIO = Field.create("TRIGGERSYNCGAPRATIO", 12, FieldType.FLOAT).setBaseOffset(1124);
public static final Field TRIGGERACTUALSYNCGAPRATIO = Field.create("TRIGGERACTUALSYNCGAPRATIO", 16, FieldType.FLOAT).setBaseOffset(1124);
public static final Field TRIGGERSTATEINDEX = Field.create("TRIGGERSTATEINDEX", 20, FieldType.INT8).setScale(1.0).setBaseOffset(1124);
public static final Field VVTCOUNTER = Field.create("VVTCOUNTER", 21, FieldType.INT8).setScale(1.0).setBaseOffset(1124);
public static final Field CAMRESYNCCOUNTER = Field.create("CAMRESYNCCOUNTER", 22, FieldType.INT8).setScale(1.0).setBaseOffset(1124);
public static final Field VVTSTATEINDEX = Field.create("VVTSTATEINDEX", 23, FieldType.INT8).setScale(1.0).setBaseOffset(1124);
public static final Field[] VALUES = {
CRANKSYNCHRONIZATIONCOUNTER,
VVTSYNCGAPRATIO,

View File

@ -1,13 +1,13 @@
package com.rusefi.config.generated;
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/algo/wall_fuel_state.txt Mon Aug 15 21:21:43 UTC 2022
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/algo\wall_fuel_state.txt Sat Nov 26 00:29:02 EST 2022
// by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*;
public class WallFuelState {
public static final Field WALLFUELCORRECTION = Field.create("WALLFUELCORRECTION", 0, FieldType.FLOAT);
public static final Field WALLFUEL = Field.create("WALLFUEL", 4, FieldType.FLOAT);
public static final Field WALLFUELCORRECTION = Field.create("WALLFUELCORRECTION", 0, FieldType.FLOAT).setBaseOffset(1152);
public static final Field WALLFUEL = Field.create("WALLFUEL", 4, FieldType.FLOAT).setBaseOffset(1152);
public static final Field[] VALUES = {
WALLFUELCORRECTION,
WALLFUEL,

View File

@ -1,19 +1,19 @@
package com.rusefi.config.generated;
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/sensors//wideband_state.txt Mon Aug 15 21:21:43 UTC 2022
// this file was generated automatically by rusEFI tool ConfigDefinition.jar based on (unknown script) controllers/sensors/\wideband_state.txt Sat Nov 26 00:29:02 EST 2022
// by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*;
public class WidebandController {
public static final Field FAULTCODE = Field.create("FAULTCODE", 0, FieldType.INT8).setScale(1.0);
public static final Field HEATERDUTY = Field.create("HEATERDUTY", 1, FieldType.INT8).setScale(1.0);
public static final Field PUMPDUTY = Field.create("PUMPDUTY", 2, FieldType.INT8).setScale(1.0);
public static final Field ALIGNMENTFILL_AT_3 = Field.create("ALIGNMENTFILL_AT_3", 3, FieldType.INT8).setScale(1.0);
public static final Field TEMPC = Field.create("TEMPC", 4, FieldType.INT16).setScale(1.0);
public static final Field NERNSTVOLTAGE = Field.create("NERNSTVOLTAGE", 6, FieldType.INT16).setScale(0.001);
public static final Field ESR = Field.create("ESR", 8, FieldType.INT16).setScale(1.0);
public static final Field ALIGNMENTFILL_AT_10 = Field.create("ALIGNMENTFILL_AT_10", 10, FieldType.INT8).setScale(1.0);
public static final Field FAULTCODE = Field.create("FAULTCODE", 0, FieldType.INT8).setScale(1.0).setBaseOffset(1248);
public static final Field HEATERDUTY = Field.create("HEATERDUTY", 1, FieldType.INT8).setScale(1.0).setBaseOffset(1248);
public static final Field PUMPDUTY = Field.create("PUMPDUTY", 2, FieldType.INT8).setScale(1.0).setBaseOffset(1248);
public static final Field ALIGNMENTFILL_AT_3 = Field.create("ALIGNMENTFILL_AT_3", 3, FieldType.INT8).setScale(1.0).setBaseOffset(1248);
public static final Field TEMPC = Field.create("TEMPC", 4, FieldType.INT16).setScale(1.0).setBaseOffset(1248);
public static final Field NERNSTVOLTAGE = Field.create("NERNSTVOLTAGE", 6, FieldType.INT16).setScale(0.001).setBaseOffset(1248);
public static final Field ESR = Field.create("ESR", 8, FieldType.INT16).setScale(1.0).setBaseOffset(1248);
public static final Field ALIGNMENTFILL_AT_10 = Field.create("ALIGNMENTFILL_AT_10", 10, FieldType.INT8).setScale(1.0).setBaseOffset(1248);
public static final Field[] VALUES = {
FAULTCODE,
HEATERDUTY,

Binary file not shown.

View File

@ -120,7 +120,7 @@ public abstract class JavaFieldsConsumer implements ConfigurationConsumer {
}
private String terminateField() {
return //".setBaseOffset(" + baseOffset + ")" +
return ".setBaseOffset(" + baseOffset + ")" +
";" + EOL;
}
}

View File

@ -20,8 +20,8 @@ public class ConfigFieldParserIssue1057Test {
state.readBufferedReader(inputString, javaFieldsConsumer);
assertEquals("\tpublic static final Field ACTIVATEAUXPID1 = Field.create(\"ACTIVATEAUXPID1\", 0, FieldType.BIT, 0);\n" +
"\tpublic static final Field FIELDNAME = Field.create(\"FIELDNAME\", 4, FieldType.INT).setScale(1.0);\n",
assertEquals("\tpublic static final Field ACTIVATEAUXPID1 = Field.create(\"ACTIVATEAUXPID1\", 0, FieldType.BIT, 0).setBaseOffset(0);\n" +
"\tpublic static final Field FIELDNAME = Field.create(\"FIELDNAME\", 4, FieldType.INT).setScale(1.0).setBaseOffset(0);\n",
javaFieldsConsumer.getContent());
}
}

View File

@ -184,10 +184,10 @@ public class ConfigFieldParserTest {
JavaFieldsConsumer javaFieldsConsumer = new TestJavaFieldsConsumer(state);
state.readBufferedReader(test, (javaFieldsConsumer));
assertEquals("\tpublic static final Field PIN = Field.create(\"PIN\", 0, FieldType.INT8).setScale(1.0);\n" +
"\tpublic static final Field PAD = Field.create(\"PAD\", 1, FieldType.INT8).setScale(1.0);\n" +
"\tpublic static final Field RPMBINS = Field.create(\"RPMBINS\", 4, FieldType.INT8).setScale(1.0);\n" +
"\tpublic static final Field VALUES = Field.create(\"VALUES\", 10, FieldType.INT8).setScale(1.0);\n", javaFieldsConsumer.getContent());
assertEquals("\tpublic static final Field PIN = Field.create(\"PIN\", 0, FieldType.INT8).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field PAD = Field.create(\"PAD\", 1, FieldType.INT8).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field RPMBINS = Field.create(\"RPMBINS\", 4, FieldType.INT8).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field VALUES = Field.create(\"VALUES\", 10, FieldType.INT8).setScale(1.0).setBaseOffset(0);\n", javaFieldsConsumer.getContent());
}
@Test
@ -260,9 +260,9 @@ public class ConfigFieldParserTest {
JavaFieldsConsumer javaFieldsConsumer = new TestJavaFieldsConsumer(state);
state.readBufferedReader(test, javaFieldsConsumer);
assertEquals("\tpublic static final Field VAR = Field.create(\"VAR\", 0, 120, FieldType.STRING).setScale(1.0);\n" +
"\tpublic static final Field PERIODMS = Field.create(\"PERIODMS\", 120, FieldType.INT16).setScale(1.0);\n" +
"\tpublic static final Field ALIGNMENTFILL_AT_122 = Field.create(\"ALIGNMENTFILL_AT_122\", 122, FieldType.INT8).setScale(1.0);\n",
assertEquals("\tpublic static final Field VAR = Field.create(\"VAR\", 0, 120, FieldType.STRING).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field PERIODMS = Field.create(\"PERIODMS\", 120, FieldType.INT16).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field ALIGNMENTFILL_AT_122 = Field.create(\"ALIGNMENTFILL_AT_122\", 122, FieldType.INT8).setScale(1.0).setBaseOffset(0);\n",
javaFieldsConsumer.getContent());
}
@ -328,22 +328,22 @@ public class ConfigFieldParserTest {
state.readBufferedReader(test, (javaFieldsConsumer));
assertEquals("\tpublic static final Field OFFSET = Field.create(\"OFFSET\", 0, FieldType.INT16).setScale(1.0);\n" +
"\tpublic static final Field PERIODMS = Field.create(\"PERIODMS\", 2, FieldType.INT16).setScale(1.0);\n" +
"\tpublic static final Field MINVALUE = Field.create(\"MINVALUE\", 4, FieldType.INT16).setScale(1.0);\n" +
"\tpublic static final Field ALIGNMENTFILL_AT_6 = Field.create(\"ALIGNMENTFILL_AT_6\", 6, FieldType.INT8).setScale(1.0);\n" +
"\tpublic static final Field ALTERNATORCONTROL_OFFSET = Field.create(\"ALTERNATORCONTROL_OFFSET\", 0, FieldType.INT16).setScale(1.0);\n" +
"\tpublic static final Field ALTERNATORCONTROL_PERIODMS = Field.create(\"ALTERNATORCONTROL_PERIODMS\", 2, FieldType.INT16).setScale(1.0);\n" +
"\tpublic static final Field ALTERNATORCONTROL_MINVALUE = Field.create(\"ALTERNATORCONTROL_MINVALUE\", 4, FieldType.INT16).setScale(1.0);\n" +
"\tpublic static final Field ALTERNATORCONTROL_ALIGNMENTFILL_AT_6 = Field.create(\"ALTERNATORCONTROL_ALIGNMENTFILL_AT_6\", 6, FieldType.INT8).setScale(1.0);\n" +
"\tpublic static final Field ETB1_OFFSET = Field.create(\"ETB1_OFFSET\", 8, FieldType.INT16).setScale(1.0);\n" +
"\tpublic static final Field ETB1_PERIODMS = Field.create(\"ETB1_PERIODMS\", 10, FieldType.INT16).setScale(1.0);\n" +
"\tpublic static final Field ETB1_MINVALUE = Field.create(\"ETB1_MINVALUE\", 12, FieldType.INT16).setScale(1.0);\n" +
"\tpublic static final Field ETB1_ALIGNMENTFILL_AT_6 = Field.create(\"ETB1_ALIGNMENTFILL_AT_6\", 14, FieldType.INT8).setScale(1.0);\n" +
"\tpublic static final Field ETB2_OFFSET = Field.create(\"ETB2_OFFSET\", 16, FieldType.INT16).setScale(1.0);\n" +
"\tpublic static final Field ETB2_PERIODMS = Field.create(\"ETB2_PERIODMS\", 18, FieldType.INT16).setScale(1.0);\n" +
"\tpublic static final Field ETB2_MINVALUE = Field.create(\"ETB2_MINVALUE\", 20, FieldType.INT16).setScale(1.0);\n" +
"\tpublic static final Field ETB2_ALIGNMENTFILL_AT_6 = Field.create(\"ETB2_ALIGNMENTFILL_AT_6\", 22, FieldType.INT8).setScale(1.0);\n",
assertEquals("\tpublic static final Field OFFSET = Field.create(\"OFFSET\", 0, FieldType.INT16).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field PERIODMS = Field.create(\"PERIODMS\", 2, FieldType.INT16).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field MINVALUE = Field.create(\"MINVALUE\", 4, FieldType.INT16).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field ALIGNMENTFILL_AT_6 = Field.create(\"ALIGNMENTFILL_AT_6\", 6, FieldType.INT8).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field ALTERNATORCONTROL_OFFSET = Field.create(\"ALTERNATORCONTROL_OFFSET\", 0, FieldType.INT16).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field ALTERNATORCONTROL_PERIODMS = Field.create(\"ALTERNATORCONTROL_PERIODMS\", 2, FieldType.INT16).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field ALTERNATORCONTROL_MINVALUE = Field.create(\"ALTERNATORCONTROL_MINVALUE\", 4, FieldType.INT16).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field ALTERNATORCONTROL_ALIGNMENTFILL_AT_6 = Field.create(\"ALTERNATORCONTROL_ALIGNMENTFILL_AT_6\", 6, FieldType.INT8).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field ETB1_OFFSET = Field.create(\"ETB1_OFFSET\", 8, FieldType.INT16).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field ETB1_PERIODMS = Field.create(\"ETB1_PERIODMS\", 10, FieldType.INT16).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field ETB1_MINVALUE = Field.create(\"ETB1_MINVALUE\", 12, FieldType.INT16).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field ETB1_ALIGNMENTFILL_AT_6 = Field.create(\"ETB1_ALIGNMENTFILL_AT_6\", 14, FieldType.INT8).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field ETB2_OFFSET = Field.create(\"ETB2_OFFSET\", 16, FieldType.INT16).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field ETB2_PERIODMS = Field.create(\"ETB2_PERIODMS\", 18, FieldType.INT16).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field ETB2_MINVALUE = Field.create(\"ETB2_MINVALUE\", 20, FieldType.INT16).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field ETB2_ALIGNMENTFILL_AT_6 = Field.create(\"ETB2_ALIGNMENTFILL_AT_6\", 22, FieldType.INT8).setScale(1.0).setBaseOffset(0);\n",
javaFieldsConsumer.getContent());
}
}
@ -363,13 +363,13 @@ public class ConfigFieldParserTest {
ReaderState state = new ReaderState();
JavaFieldsConsumer javaFieldsConsumer = new TestJavaFieldsConsumer(state);
state.readBufferedReader(test, consumer, javaFieldsConsumer);
assertEquals("\tpublic static final Field BYTE1 = Field.create(\"BYTE1\", 0, FieldType.INT8).setScale(1.0);\n" +
"\tpublic static final Field ALIGNMENTFILL_AT_1 = Field.create(\"ALIGNMENTFILL_AT_1\", 1, FieldType.INT8).setScale(1.0);\n" +
"\tpublic static final Field SHORT = Field.create(\"SHORT\", 2, FieldType.INT16).setScale(1.0);\n" +
"\tpublic static final Field INT2 = Field.create(\"INT2\", 4, FieldType.INT).setScale(1.0);\n" +
"\tpublic static final Field BYTE2 = Field.create(\"BYTE2\", 8, FieldType.INT8).setScale(1.0);\n" +
"\tpublic static final Field ALIGNMENTFILL_AT_9 = Field.create(\"ALIGNMENTFILL_AT_9\", 9, FieldType.INT8).setScale(1.0);\n" +
"\tpublic static final Field PERIODMS = Field.create(\"PERIODMS\", 12, FieldType.BIT, 0);\n",
assertEquals("\tpublic static final Field BYTE1 = Field.create(\"BYTE1\", 0, FieldType.INT8).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field ALIGNMENTFILL_AT_1 = Field.create(\"ALIGNMENTFILL_AT_1\", 1, FieldType.INT8).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field SHORT = Field.create(\"SHORT\", 2, FieldType.INT16).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field INT2 = Field.create(\"INT2\", 4, FieldType.INT).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field BYTE2 = Field.create(\"BYTE2\", 8, FieldType.INT8).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field ALIGNMENTFILL_AT_9 = Field.create(\"ALIGNMENTFILL_AT_9\", 9, FieldType.INT8).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field PERIODMS = Field.create(\"PERIODMS\", 12, FieldType.BIT, 0).setBaseOffset(0);\n",
javaFieldsConsumer.getContent());
assertEquals("// start of pid_s\n" +
"struct pid_s {\n" +
@ -513,7 +513,7 @@ public class ConfigFieldParserTest {
ReaderState state = new ReaderState();
JavaFieldsConsumer javaFieldsConsumer = new TestJavaFieldsConsumer(state);
state.readBufferedReader(test, consumer, javaFieldsConsumer);
assertEquals("\tpublic static final Field FIELD1 = Field.create(\"FIELD1\", 0, FieldType.INT).setScale(0.01);\n",
assertEquals("\tpublic static final Field FIELD1 = Field.create(\"FIELD1\", 0, FieldType.INT).setScale(0.01).setBaseOffset(0);\n",
javaFieldsConsumer.getContent());
assertEquals("// start of pid_s\n" +
"struct pid_s {\n" +

View File

@ -61,10 +61,10 @@ public class TSProjectConsumerTest {
"periodMs = scalar, S16, 20, \"ms\", 0.1, 0, 0, 3000, 0\n" +
"; total TS size = 24\n", tsProjectConsumer.getContent());
assertEquals("\tpublic static final Field PERIODMS2 = Field.create(\"PERIODMS2\", 0, FieldType.INT).setScale(1.0);\n" +
"\tpublic static final Field AFRTABLE = Field.create(\"AFRTABLE\", 4, FieldType.INT).setScale(1.0);\n" +
"\tpublic static final Field PERIODMS = Field.create(\"PERIODMS\", 20, FieldType.INT16).setScale(0.1);\n" +
"\tpublic static final Field ALIGNMENTFILL_AT_22 = Field.create(\"ALIGNMENTFILL_AT_22\", 22, FieldType.INT8).setScale(1.0);\n",
assertEquals("\tpublic static final Field PERIODMS2 = Field.create(\"PERIODMS2\", 0, FieldType.INT).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field AFRTABLE = Field.create(\"AFRTABLE\", 4, FieldType.INT).setScale(1.0).setBaseOffset(0);\n" +
"\tpublic static final Field PERIODMS = Field.create(\"PERIODMS\", 20, FieldType.INT16).setScale(0.1).setBaseOffset(0);\n" +
"\tpublic static final Field ALIGNMENTFILL_AT_22 = Field.create(\"ALIGNMENTFILL_AT_22\", 22, FieldType.INT8).setScale(1.0).setBaseOffset(0);\n",
javaFieldsConsumer.getContent());