Skip to content

Commit

Permalink
remove long obsoleted FSIO
Browse files Browse the repository at this point in the history
  • Loading branch information
mi-hol authored Jun 23, 2024
1 parent b0467b5 commit e2299c5
Showing 1 changed file with 0 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,56 +290,6 @@ public void testDefine() {
state.getVariableRegistry().getJavaConstants());
}

@Test
public void testFsioVisible() {
{
ReaderStateImpl state = new ReaderStateImpl();
ConfigFieldImpl cf = ConfigFieldImpl.parse(state, "int fsio_visible field");
assertEquals(cf.getType(), "int");
assertTrue(cf.isFsioVisible());
assertEquals("Name", cf.getName(), "field");
}

{
ReaderStateImpl state = new ReaderStateImpl();
String test = "struct pid_s\n" +
"\tint16_t fsio_visible offset;Linear addition to PID logic;\"\", 1, 0, -1000, 1000, 0\n" +
"\tint16_t periodMs;PID dTime;\"ms\", 1, 0, 0, 3000, 0\n" +
"\tint16_t fsio_visible minValue;Output min value;\"\", 1, 0, -30000, 30000.0, 0\n" +
"end_struct\n" +
"struct_no_prefix engine_configuration_s\n" +
"\tpid_s alternatorControl;\n" +
"#define ETB_COUNT 2\n" +
"\tpid_s[ETB_COUNT iterate] etb;\n" +
"end_struct\n" +
"" +
"";

JavaFieldsConsumer javaFieldsConsumer = new TestJavaFieldsConsumer(state);

state.readBufferedReader(test, (javaFieldsConsumer));


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

@Test
public void test2byteOffset() {
String test = "struct_no_prefix pid_s\n" +
Expand Down

0 comments on commit e2299c5

Please sign in to comment.