From c8ddf05bb532fb349c197595493708732ff7ae19 Mon Sep 17 00:00:00 2001 From: rusefillc Date: Fri, 30 Apr 2021 01:45:35 -0400 Subject: [PATCH] Refactoring, technical debt: export more of trigger attributes into triggers.txt file #2077 --- .../src/com/rusefi/TriggerProcessor.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/java_tools/configuration_definition/src/com/rusefi/TriggerProcessor.java b/java_tools/configuration_definition/src/com/rusefi/TriggerProcessor.java index 852edb9ab4..66d2625e7d 100644 --- a/java_tools/configuration_definition/src/com/rusefi/TriggerProcessor.java +++ b/java_tools/configuration_definition/src/com/rusefi/TriggerProcessor.java @@ -1,17 +1,14 @@ package com.rusefi; import com.rusefi.enum_reader.Value; -import org.yaml.snakeyaml.Yaml; +import com.rusefi.models.trigger.WheelMetaReader; import java.io.FileNotFoundException; -import java.io.FileReader; import java.util.Map; import java.util.TreeMap; public class TriggerProcessor { - private static final String CONTROLLERS_TRIGGER_DECODERS_TRIGGERS_META_YAML = "firmware/controllers/trigger/decoders/triggers-meta.yaml"; - public void run(EnumsReader enumsReader, VariableRegistry instance) { Map> enums = enumsReader.getEnums(); @@ -23,8 +20,6 @@ public class TriggerProcessor { TreeMap valueNameById = instance.resolveEnumValues(enumsReader, "trigger_type_e"); System.out.println("resolved: " + valueNameById); - System.exit(-1); - } @@ -32,11 +27,6 @@ public class TriggerProcessor { * this method is used for manual testing only */ public static void main(String[] args) throws FileNotFoundException { - readTriggers("../../" + CONTROLLERS_TRIGGER_DECODERS_TRIGGERS_META_YAML); - } - - private static void readTriggers(String triggerMetaYamlFile) throws FileNotFoundException { - Yaml yaml = new Yaml(); - yaml.load(new FileReader(triggerMetaYamlFile)); + WheelMetaReader.readTriggers("../../" + WheelMetaReader.CONTROLLERS_TRIGGER_DECODERS_TRIGGERS_META_YAML); } }