Refactoring, technical debt: export more of trigger attributes into triggers.txt file #2077
This commit is contained in:
parent
625b1ba778
commit
c8ddf05bb5
|
@ -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<String, Map<String, Value>> enums = enumsReader.getEnums();
|
||||
|
||||
|
@ -23,8 +20,6 @@ public class TriggerProcessor {
|
|||
TreeMap<Integer, String> 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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue