only:Split ConfigGenerator around trigger_defines.txt fix #5051

This commit is contained in:
Andrey 2023-06-17 22:54:23 -04:00
parent bee34f6d98
commit 4f439064c0
7 changed files with 36 additions and 19 deletions

View File

@ -203,17 +203,6 @@ struct_no_prefix engine_configuration_s
#define CAN_DEFAULT_BASE 0x200
#define TRIGGER_IS_CRANK_KEY "crankBased"
#define TRIGGER_CYCLE_DURATION "cycleDuration"
#define TRIGGER_IS_SECOND_WHEEL_CAM "isSecondWheelCam"
#define TRIGGER_HAS_SECOND_CHANNEL "hasSecondChannel"
#define TRIGGER_HARDCODED_OPERATION_MODE "knownOperationMode"
#define TRIGGER_COMMENT "#"
#define TRIGGER_GAPS_COUNT "gapsCount"
#define TRIGGER_GAP_FROM "gapFrom"
#define TRIGGER_GAP_TO "gapTo"
#define TRIGGER_WITH_SYNC "isSynchronizationNeeded"
!
! all the xxx_PACKING_xxx constants are about persisting tables in compact for, for example packing RPM with 50 increment in a byte
! or packing numeric voltage inside an integer byte

View File

@ -1,3 +1,13 @@
! todo: remove from rusefi_config.txt
#define TRIGGERS_FILE_NAME "triggers.txt"
#define TRIGGER_IS_CRANK_KEY "crankBased"
#define TRIGGER_CYCLE_DURATION "cycleDuration"
#define TRIGGER_IS_SECOND_WHEEL_CAM "isSecondWheelCam"
#define TRIGGER_HAS_SECOND_CHANNEL "hasSecondChannel"
#define TRIGGER_HARDCODED_OPERATION_MODE "knownOperationMode"
#define TRIGGER_COMMENT "#"
#define TRIGGER_GAPS_COUNT "gapsCount"
#define TRIGGER_GAP_FROM "gapFrom"
#define TRIGGER_GAP_TO "gapTo"
#define TRIGGER_WITH_SYNC "isSynchronizationNeeded"

View File

@ -11,7 +11,6 @@ defaultTasks 'shadowJar'
dependencies {
api project(':config_definition_base')
api project(':trigger-image')
api project(':models')
antlr global_libs.antlr
}

View File

@ -1,10 +1,20 @@
package com.rusefi.config.generated;
// this file was generated automatically by rusEFI tool enum_to_string.jar based on (unknown script) integration/rusefi_config_trigger.txt Sat Jun 17 22:36:04 EDT 2023
// this file was generated automatically by rusEFI tool enum_to_string.jar based on (unknown script) integration/rusefi_config_trigger.txt Sat Jun 17 22:43:03 EDT 2023
// by class com.rusefi.output.FileJavaFieldsConsumer
import com.rusefi.config.*;
public class TriggerMeta {
public static final String TRIGGER_COMMENT = "#";
public static final String TRIGGER_CYCLE_DURATION = "cycleDuration";
public static final String TRIGGER_GAP_FROM = "gapFrom";
public static final String TRIGGER_GAP_TO = "gapTo";
public static final String TRIGGER_GAPS_COUNT = "gapsCount";
public static final String TRIGGER_HARDCODED_OPERATION_MODE = "knownOperationMode";
public static final String TRIGGER_HAS_SECOND_CHANNEL = "hasSecondChannel";
public static final String TRIGGER_IS_CRANK_KEY = "crankBased";
public static final String TRIGGER_IS_SECOND_WHEEL_CAM = "isSecondWheelCam";
public static final String TRIGGER_WITH_SYNC = "isSynchronizationNeeded";
public static final String TRIGGERS_FILE_NAME = "triggers.txt";
}

View File

@ -1,6 +1,5 @@
package com.rusefi.trigger;
import com.rusefi.config.generated.Fields;
import org.jetbrains.annotations.NotNull;
import java.io.*;
@ -8,7 +7,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import static com.rusefi.config.generated.Fields.*;
import static com.rusefi.config.generated.TriggerMeta.*;
public class TriggerWheelInfo {
private static final String TRIGGERTYPE = "TRIGGERTYPE";
@ -123,7 +122,7 @@ public class TriggerWheelInfo {
}
static void readWheels(String workingFolder, TriggerWheelInfoConsumer consumer) {
String fileName = workingFolder + File.separator + Fields.TRIGGERS_FILE_NAME;
String fileName = workingFolder + File.separator + TRIGGERS_FILE_NAME;
BufferedReader br;
try {
br = new BufferedReader(new FileReader(fileName));

View File

@ -1,8 +1,18 @@
// this section was generated automatically by rusEFI tool enum_to_string.jar based on (unknown script) integration/rusefi_config_trigger.txt Sat Jun 17 22:27:23 EDT 2023
// this section was generated automatically by rusEFI tool enum_to_string.jar based on (unknown script) integration/rusefi_config_trigger.txt Sat Jun 17 22:43:03 EDT 2023
// by class com.rusefi.output.CHeaderConsumer
// begin
#pragma once
#include "rusefi_types.h"
#define TRIGGER_COMMENT "#"
#define TRIGGER_CYCLE_DURATION "cycleDuration"
#define TRIGGER_GAP_FROM "gapFrom"
#define TRIGGER_GAP_TO "gapTo"
#define TRIGGER_GAPS_COUNT "gapsCount"
#define TRIGGER_HARDCODED_OPERATION_MODE "knownOperationMode"
#define TRIGGER_HAS_SECOND_CHANNEL "hasSecondChannel"
#define TRIGGER_IS_CRANK_KEY "crankBased"
#define TRIGGER_IS_SECOND_WHEEL_CAM "isSecondWheelCam"
#define TRIGGER_WITH_SYNC "isSynchronizationNeeded"
#define TRIGGERS_FILE_NAME "triggers.txt"
// end
// this section was generated automatically by rusEFI tool enum_to_string.jar based on (unknown script) integration/rusefi_config_trigger.txt Sat Jun 17 22:27:23 EDT 2023
// this section was generated automatically by rusEFI tool enum_to_string.jar based on (unknown script) integration/rusefi_config_trigger.txt Sat Jun 17 22:43:03 EDT 2023