diff --git a/firmware/gen_config.bat b/firmware/gen_config.bat index 4be42cbce6..ae8c5fc406 100644 --- a/firmware/gen_config.bat +++ b/firmware/gen_config.bat @@ -20,6 +20,7 @@ java -DSystemOut.name=gen_config ^ -initialize_to_zero false ^ -tool gen_config.bat ^ -c_defines controllers\generated\rusefi_generated.h ^ + -firing_order controllers/algo/firing_order.h ^ -c_destination controllers\generated\engine_configuration_generated_structures.h ^ -c_fsio_constants controllers\generated\fsio_enums_generated.def ^ -c_fsio_getters controllers\generated\fsio_getters.def ^ diff --git a/firmware/gen_config_board.bat b/firmware/gen_config_board.bat index 6b7a4b882c..929a84f4bc 100644 --- a/firmware/gen_config_board.bat +++ b/firmware/gen_config_board.bat @@ -31,6 +31,7 @@ java -DSystemOut.name=gen_config_board ^ -definition integration\rusefi_config.txt ^ -tool gen_config.bat ^ -ts_destination tunerstudio ^ + -firing_order controllers/algo/firing_order.h ^ -ts_output_name rusefi_%BOARDNAME%.ini ^ -prepend tunerstudio/%BOARDNAME%_prefix.txt ^ -prepend config/boards/%BOARDNAME%/prepend.txt ^ diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index 4fec66af45..6d673c487f 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -41,19 +41,6 @@ ! all the sub-structures are going to be nested within the primary structure, that's ! needed to get a proper TunerStudio file -! this section is auto-generated by FiringOrderTSLogic.java -#define ignitionPin2logic || ((firingOrder == 2) || (firingOrder == 7) || (firingOrder == 9) || (firingOrder == 11) || (firingOrder == 12)) -#define ignitionPin3logic || ((firingOrder == 1) || (firingOrder == 3) || (firingOrder == 4) || (firingOrder == 5) || (firingOrder == 9)) -#define ignitionPin4logic || ((firingOrder == 5) || (firingOrder == 7) || (firingOrder == 12)) -#define ignitionPin5logic || ((firingOrder == 4) || (firingOrder == 12)) -#define ignitionPin6logic -#define ignitionPin7logic || ((firingOrder == 11)) -#define ignitionPin8logic || ((firingOrder == 5) || (firingOrder == 11)) -#define ignitionPin9logic -#define ignitionPin10logic -#define ignitionPin11logic -#define ignitionPin12logic - struct persistent_config_s struct_no_prefix engine_configuration_s diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 693e29d5f4..69b1c267b3 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1596,17 +1596,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00" field = "Ignition Pin 1", ignitionPins1, {isIgnitionEnabled == 1} ; see rusefi_config.txt comment next to 'ignitionPin2logic' which says ; this section is auto-generated by FiringOrderTSLogic.java - field = "Ignition Pin 2", ignitionPins2, {isIgnitionEnabled == 1 && (ignitionMode != 0 && cylindersCount > 1) && (ignitionMode !=2 || twoWireBatchIgnition == 1 || ((firingOrder == 2) || (firingOrder == 7) || (firingOrder == 9) || (firingOrder == 11) || (firingOrder == 12)))} - field = "Ignition Pin 3", ignitionPins3, {isIgnitionEnabled == 1 && (ignitionMode != 0 && cylindersCount > 2) && (ignitionMode !=2 || twoWireBatchIgnition == 1 || ((firingOrder == 1) || (firingOrder == 3) || (firingOrder == 4) || (firingOrder == 5) || (firingOrder == 9)))} - field = "Ignition Pin 4", ignitionPins4, {isIgnitionEnabled == 1 && (ignitionMode != 0 && cylindersCount > 3) && (ignitionMode !=2 || twoWireBatchIgnition == 1 || ((firingOrder == 5) || (firingOrder == 7) || (firingOrder == 12)))} - field = "Ignition Pin 5", ignitionPins5, {isIgnitionEnabled == 1 && (ignitionMode != 0 && cylindersCount > 4) && (ignitionMode !=2 || twoWireBatchIgnition == 1 || ((firingOrder == 4) || (firingOrder == 12)))} - field = "Ignition Pin 6", ignitionPins6, {isIgnitionEnabled == 1 && (ignitionMode != 0 && cylindersCount > 5) && (ignitionMode !=2 || twoWireBatchIgnition == 1 )} - field = "Ignition Pin 7", ignitionPins7, {isIgnitionEnabled == 1 && (ignitionMode != 0 && cylindersCount > 6) && (ignitionMode !=2 || twoWireBatchIgnition == 1 || ((firingOrder == 11)))} - field = "Ignition Pin 8", ignitionPins8, {isIgnitionEnabled == 1 && (ignitionMode != 0 && cylindersCount > 7) && (ignitionMode !=2 || twoWireBatchIgnition == 1 || ((firingOrder == 5) || (firingOrder == 11)))} - field = "Ignition Pin 9", ignitionPins9, {isIgnitionEnabled == 1 && (ignitionMode != 0 && cylindersCount > 8) && (ignitionMode !=2 || twoWireBatchIgnition == 1 || ((firingOrder == 5) || (firingOrder == 11)))} - field = "Ignition Pin 10", ignitionPins10, {isIgnitionEnabled == 1 && (ignitionMode != 0 && cylindersCount > 9) && (ignitionMode !=2 || twoWireBatchIgnition == 1 || ((firingOrder == 5) || (firingOrder == 11)))} - field = "Ignition Pin 11", ignitionPins11, {isIgnitionEnabled == 1 && (ignitionMode != 0 && cylindersCount > 10) && (ignitionMode !=2 || twoWireBatchIgnition == 1 || ((firingOrder == 5) || (firingOrder == 11)))} - field = "Ignition Pin 12", ignitionPins12, {isIgnitionEnabled == 1 && (ignitionMode != 0 && cylindersCount > 11) && (ignitionMode !=2 || twoWireBatchIgnition == 1 || ((firingOrder == 5) || (firingOrder == 11)))} +@@FIRINGORDER@@ field = "This is useful to have tachometer working" field = " while converting from distributor" field = "Dizzy out Pin", dizzySparkOutputPin, {isIgnitionEnabled == 1} diff --git a/java_console/.idea/runConfigurations/FiringOrderTSLogic.xml b/java_console/.idea/runConfigurations/FiringOrderTSLogic.xml index a8e616a2ad..34c72682ce 100644 --- a/java_console/.idea/runConfigurations/FiringOrderTSLogic.xml +++ b/java_console/.idea/runConfigurations/FiringOrderTSLogic.xml @@ -1,7 +1,7 @@