From 13ccfefb7e68538fb7d719a9393962fb8b7fe099 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Tue, 19 Apr 2022 14:49:57 -0400 Subject: [PATCH] https://github.com/rusefi/web_backend/issues/166 --- firmware/controllers/trigger/trigger_central.txt | 2 +- .../src/main/java/com/rusefi/ReaderState.java | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/firmware/controllers/trigger/trigger_central.txt b/firmware/controllers/trigger/trigger_central.txt index 585ea2eb26..e19d16440e 100644 --- a/firmware/controllers/trigger/trigger_central.txt +++ b/firmware/controllers/trigger/trigger_central.txt @@ -2,7 +2,7 @@ struct_no_prefix trigger_central_s - int[HW_EVENT_TYPES iterate] hwEventCounters;Counter of hardware events since ECU start + int[HW_EVENT_TYPES iterate] hwEventCounters;Hardware events since boot int vvtCamCounter diff --git a/java_tools/configuration_definition/src/main/java/com/rusefi/ReaderState.java b/java_tools/configuration_definition/src/main/java/com/rusefi/ReaderState.java index 9520421457..43d958096f 100644 --- a/java_tools/configuration_definition/src/main/java/com/rusefi/ReaderState.java +++ b/java_tools/configuration_definition/src/main/java/com/rusefi/ReaderState.java @@ -24,6 +24,8 @@ import static com.rusefi.output.JavaSensorsConsumer.quote; * 12/19/18 */ public class ReaderState { + // https://github.com/rusefi/web_backend/issues/166 + private static final int MSQ_LENGTH_LIMIT = 34; // used to update other files public List inputFiles = new ArrayList<>(); @@ -310,7 +312,10 @@ public class ReaderState { @NotNull private static String getCommentWithIndex(ConfigField cf, int i) { String unquoted = unquote(cf.getCommentOrName()); - return quote(unquoted + " " + i); + String string = unquoted + " " + i; + if (string.length() > MSQ_LENGTH_LIMIT) + throw new IllegalStateException("[" + string + "] is too long for rusEFI online"); + return quote(string); } public String getHeader() {