diff --git a/firmware/controllers/algo/engine_configuration_generated_structures.h b/firmware/controllers/algo/engine_configuration_generated_structures.h index 23871634f3..8c5328ef1c 100644 --- a/firmware/controllers/algo/engine_configuration_generated_structures.h +++ b/firmware/controllers/algo/engine_configuration_generated_structures.h @@ -1,4 +1,4 @@ -// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Aug 17 02:29:38 EDT 2017 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Aug 28 20:53:46 EDT 2017 // begin #ifndef ENGINE_CONFIGURATION_GENERATED_H_ #define ENGINE_CONFIGURATION_GENERATED_H_ @@ -1240,7 +1240,7 @@ typedef struct { bool useFSIO16ForTimingAdjustment : 1; /** offset 1488 bit 12 */ - bool unusedbit_10 : 1; + bool tachPulseDurationAsDutyCycle : 1; /** offset 1488 bit 13 */ bool isAlternatorControlEnabled : 1; @@ -1708,7 +1708,7 @@ typedef struct { */ float mapAccelTaperMult[MAP_ACCEL_TAPER]; /** - * This implementation makes a pulse every time one of the coils is charged. See also tachOutputPin + * This implementation makes a pulse every time one of the coils is charged, using coil dwell for pulse width. See also tachOutputPin * offset 2368 */ brain_pin_e dizzySparkOutputPin; @@ -2158,4 +2158,4 @@ typedef struct { #endif // end -// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Aug 17 02:29:38 EDT 2017 +// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Aug 28 20:53:46 EDT 2017 diff --git a/firmware/controllers/algo/rusefi_generated.h b/firmware/controllers/algo/rusefi_generated.h index 81005e1cb4..3646ed5b81 100644 --- a/firmware/controllers/algo/rusefi_generated.h +++ b/firmware/controllers/algo/rusefi_generated.h @@ -862,8 +862,8 @@ #define useLinearIatSensor_offset_hex 5d0 #define useFSIO16ForTimingAdjustment_offset 1488 #define useFSIO16ForTimingAdjustment_offset_hex 5d0 -#define unusedbit_10_offset 1488 -#define unusedbit_10_offset_hex 5d0 +#define tachPulseDurationAsDutyCycle_offset 1488 +#define tachPulseDurationAsDutyCycle_offset_hex 5d0 #define isAlternatorControlEnabled_offset 1488 #define isAlternatorControlEnabled_offset_hex 5d0 #define unusedBit__3_offset 1488 diff --git a/firmware/controllers/tachometer.cpp b/firmware/controllers/tachometer.cpp index dc69f4fa49..7bc90f842b 100644 --- a/firmware/controllers/tachometer.cpp +++ b/firmware/controllers/tachometer.cpp @@ -27,7 +27,14 @@ static void tachSignalCallback(trigger_event_e ckpSignalType, return; } enginePins.tachOut.setHigh(); - scheduleTask(&tachTurnSignalOff, (int)MS2US(engineConfiguration->tachPulseDuractionMs), (schfunc_t) &turnTachPinLow, NULL); + float durationMs; + if (engineConfiguration->tachPulseDurationAsDutyCycle) { + // todo: implement tachPulseDurationAsDutyCycle + durationMs = engineConfiguration->tachPulseDuractionMs; + } else { + durationMs = engineConfiguration->tachPulseDuractionMs; + } + scheduleTask(&tachTurnSignalOff, (int)MS2US(durationMs), (schfunc_t) &turnTachPinLow, NULL); } void initTachometer(void) { diff --git a/firmware/integration/rusefi_config.txt b/firmware/integration/rusefi_config.txt index d27dd8f270..a764acb4c1 100644 --- a/firmware/integration/rusefi_config.txt +++ b/firmware/integration/rusefi_config.txt @@ -601,7 +601,7 @@ bit vvtDisplayInverted bit canWriteEnabled bit useLinearIatSensor bit useFSIO16ForTimingAdjustment;See fsioTimingAdjustment - bit unusedbit_10 + bit tachPulseDurationAsDutyCycle bit isAlternatorControlEnabled bit unusedBit__3 bit unusedbit_8 @@ -760,7 +760,7 @@ custom pin_mode_e 4 bits, U32, @OFFSET@, [0:5], @@pin_mode_e_enum@@ float[MAP_ACCEL_TAPER] mapAccelTaperBins;;"counter", 1, 0, 0.0, 300, 0 float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300, 2 - brain_pin_e dizzySparkOutputPin;+This implementation makes a pulse every time one of the coils is charged. See also tachOutputPin + brain_pin_e dizzySparkOutputPin;+This implementation makes a pulse every time one of the coils is charged, using coil dwell for pulse width. See also tachOutputPin pin_output_mode_e dizzySparkOutputPinMode; adc_channel_e[FSIO_ANALOG_INPUT_COUNT iterate] fsioAdc;todo: rename to fsioAnalogInputs float fixedTiming;Fixed timing, useful for TDC testing;"deg", 1, 0, -720, 720, 2 diff --git a/firmware/tunerstudio/rusefi.input b/firmware/tunerstudio/rusefi.input index 976d781ae9..2c90baf7e3 100644 --- a/firmware/tunerstudio/rusefi.input +++ b/firmware/tunerstudio/rusefi.input @@ -1531,6 +1531,7 @@ cmd_stop_engine = "w\x00\x99\x00\x00" field = "pin", tachOutputPin field = "pin mode", tachOutputPinMode field = "rise at trigger index", tachPulseTriggerIndex + fiedl = "pulse duration is duty cycle", tachPulseDurationAsDutyCycle field = "pulse duration", tachPulseDuractionMs diff --git a/java_console/models/src/com/rusefi/config/Fields.java b/java_console/models/src/com/rusefi/config/Fields.java index ae67755842..ddfcc7cc5c 100644 --- a/java_console/models/src/com/rusefi/config/Fields.java +++ b/java_console/models/src/com/rusefi/config/Fields.java @@ -1,6 +1,6 @@ package com.rusefi.config; -// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Aug 17 02:29:38 EDT 2017 +// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Mon Aug 28 20:53:46 EDT 2017 public class Fields { public static final int LE_COMMAND_LENGTH = 200; public static final int BLOCKING_FACTOR = 400; @@ -633,7 +633,7 @@ public class Fields { public static final int canWriteEnabled_offset = 1488; public static final int useLinearIatSensor_offset = 1488; public static final int useFSIO16ForTimingAdjustment_offset = 1488; - public static final int unusedbit_10_offset = 1488; + public static final int tachPulseDurationAsDutyCycle_offset = 1488; public static final int isAlternatorControlEnabled_offset = 1488; public static final int unusedBit__3_offset = 1488; public static final int unusedbit_8_offset = 1488; @@ -1504,7 +1504,7 @@ public class Fields { public static final Field CANWRITEENABLED = Field.create("CANWRITEENABLED", 1488, FieldType.BIT, 9); public static final Field USELINEARIATSENSOR = Field.create("USELINEARIATSENSOR", 1488, FieldType.BIT, 10); public static final Field USEFSIO16FORTIMINGADJUSTMENT = Field.create("USEFSIO16FORTIMINGADJUSTMENT", 1488, FieldType.BIT, 11); - public static final Field UNUSEDBIT_10 = Field.create("UNUSEDBIT_10", 1488, FieldType.BIT, 12); + public static final Field TACHPULSEDURATIONASDUTYCYCLE = Field.create("TACHPULSEDURATIONASDUTYCYCLE", 1488, FieldType.BIT, 12); public static final Field ISALTERNATORCONTROLENABLED = Field.create("ISALTERNATORCONTROLENABLED", 1488, FieldType.BIT, 13); public static final Field UNUSEDBIT__3 = Field.create("UNUSEDBIT__3", 1488, FieldType.BIT, 14); public static final Field UNUSEDBIT_8 = Field.create("UNUSEDBIT_8", 1488, FieldType.BIT, 15);