From 7850e6e57e602c9de8ef60b17aa45e2f952c33d4 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Fri, 14 Jan 2022 22:44:22 -0500 Subject: [PATCH] assert that C and TS enum sizes match #3786 is this test testing anything? --- .../boards/hellen/alphax-2chan/board_configuration.cpp | 5 +++++ .../src/main/java/com/rusefi/test/ConfigFieldParserTest.java | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/firmware/config/boards/hellen/alphax-2chan/board_configuration.cpp b/firmware/config/boards/hellen/alphax-2chan/board_configuration.cpp index f78f34cd96..17138b5af4 100644 --- a/firmware/config/boards/hellen/alphax-2chan/board_configuration.cpp +++ b/firmware/config/boards/hellen/alphax-2chan/board_configuration.cpp @@ -18,6 +18,8 @@ static OutputPin alphaEn; static OutputPin alphaTachPullUp; static OutputPin alphaTempPullUp; +static OutputPin alphaCrankPPullUp; +static OutputPin alphaCrankNPullUp; static void setInjectorPins() { engineConfiguration->injectionPins[0] = H144_LS_1; @@ -94,6 +96,9 @@ void boardInitHardware() { alphaEn.setValue(1); alphaTachPullUp.initPin("a-tach", H144_OUT_IO1); + alphaTempPullUp.initPin("a-temp", H144_OUT_IO4); + alphaCrankPPullUp.initPin("a-crank-p", H144_OUT_IO2); + alphaCrankNPullUp.initPin("a-crank-n", H144_OUT_IO5); } void setBoardConfigOverrides() { diff --git a/java_tools/configuration_definition/src/main/java/com/rusefi/test/ConfigFieldParserTest.java b/java_tools/configuration_definition/src/main/java/com/rusefi/test/ConfigFieldParserTest.java index 473e0d08bb..dd417beb3d 100644 --- a/java_tools/configuration_definition/src/main/java/com/rusefi/test/ConfigFieldParserTest.java +++ b/java_tools/configuration_definition/src/main/java/com/rusefi/test/ConfigFieldParserTest.java @@ -78,8 +78,9 @@ public class ConfigFieldParserTest { @Test public void testCustomEnum() throws IOException { String test = "struct pid_s\n" + + "#define ego_sensor_e_size 4\n" + "#define ego_sensor_e_enum \"BPSX\", \"Innovate\", \"14Point7\"\n" + - "custom ego_sensor_e 4 bits, S32, @OFFSET@, [0:1], @@ego_sensor_e_enum@@\n" + + "custom ego_sensor_e @@ego_sensor_e_size@@ bits, S32, @OFFSET@, [0:1], @@ego_sensor_e_enum@@\n" + "ego_sensor_e afr_type;\n" + "end_struct\n"; ReaderState state = new ReaderState();