EFI_CJ125_DIRECTLY_CONNECTED_UR should be a runtime parameter fix #914
This commit is contained in:
parent
52462550dd
commit
3fa5399ed7
|
@ -112,9 +112,6 @@
|
|||
#undef EFI_IDLE_INCREMENTAL_PID_CIC
|
||||
#define EFI_IDLE_INCREMENTAL_PID_CIC TRUE
|
||||
|
||||
#undef EFI_CJ125_DIRECTLY_CONNECTED_UR
|
||||
#define EFI_CJ125_DIRECTLY_CONNECTED_UR TRUE
|
||||
|
||||
#define RPM_LOW_THRESHOLD 8 // RPM=8 is an empirical lower sensitivity threshold of MAX9926 for 60-2
|
||||
#define NO_RPM_EVENTS_TIMEOUT_SECS 5 // (RPM < 12)
|
||||
|
||||
|
|
|
@ -110,9 +110,6 @@
|
|||
#undef EFI_IDLE_INCREMENTAL_PID_CIC
|
||||
#define EFI_IDLE_INCREMENTAL_PID_CIC TRUE
|
||||
|
||||
#undef EFI_CJ125_DIRECTLY_CONNECTED_UR
|
||||
#define EFI_CJ125_DIRECTLY_CONNECTED_UR TRUE
|
||||
|
||||
#define RPM_LOW_THRESHOLD 8 // RPM=8 is an empirical lower sensitivity threshold of MAX9926 for 60-2
|
||||
#define NO_RPM_EVENTS_TIMEOUT_SECS 5 // (RPM < 12)
|
||||
|
||||
|
|
|
@ -13,9 +13,6 @@
|
|||
|
||||
#if EFI_CJ125 && HAL_USE_SPI
|
||||
|
||||
// looks like 3v range should be enough, divider not needed
|
||||
#define EFI_CJ125_DIRECTLY_CONNECTED_UR TRUE
|
||||
|
||||
#include "adc_inputs.h"
|
||||
|
||||
//#define CJ125_DEBUG
|
||||
|
@ -112,13 +109,13 @@ static float getUr() {
|
|||
#if ! EFI_UNIT_TEST
|
||||
if (CONFIG(cj125ur) != EFI_ADC_NONE) {
|
||||
#if EFI_PROD_CODE
|
||||
#ifdef EFI_CJ125_DIRECTLY_CONNECTED_UR
|
||||
if (!engineConfiguration->cj125isUrDivided) {
|
||||
// in case of directly connected Ur signal from CJ125 to the ADC pin of MCU
|
||||
return getVoltage("cj125ur", CONFIG(cj125ur));
|
||||
#else
|
||||
} else {
|
||||
// if a standard voltage division scheme with OpAmp is used
|
||||
return getVoltageDivided("cj125ur", CONFIG(cj125ur));
|
||||
#endif /* EFI_CJ125_DIRECTLY_CONNECTED_UR */
|
||||
}
|
||||
#endif /* EFI_PROD_CODE */
|
||||
}
|
||||
return 0.0f;
|
||||
|
|
|
@ -297,7 +297,7 @@ bit cj125isLsu49;
|
|||
bit etb1_use_two_wires;
|
||||
bit etb2_use_two_wires;
|
||||
bit showSdCardWarning;
|
||||
bit issue_294_15;
|
||||
bit cj125isUrDivided;looks like 3v range should be enough, divider not needed
|
||||
bit issue_294_16;
|
||||
bit issue_294_17;
|
||||
bit issue_294_18;
|
||||
|
|
|
@ -2019,6 +2019,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
|
|||
field = "UA input", cj125ua, {isCJ125Enabled == 1}
|
||||
field = "UR input", cj125ur, {isCJ125Enabled == 1}
|
||||
field = "Is UA input divided?" cj125isUaDivided, {isCJ125Enabled == 1}
|
||||
field = "Is UR input divided?" cj125isUrDivided, {isCJ125Enabled == 1}
|
||||
|
||||
dialog = spiFunction, "SPI settings"
|
||||
field = "!ECU reboot needed to apply these settings"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config.generated;
|
||||
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Mon Sep 02 00:13:32 EDT 2019
|
||||
// this file was generated automatically by rusEfi tool ConfigDefinition.jar based on integration\rusefi_config.txt Tue Sep 03 18:36:09 EDT 2019
|
||||
|
||||
// by class com.rusefi.output.JavaFieldsConsumer
|
||||
import com.rusefi.config.*;
|
||||
|
@ -186,6 +186,7 @@ public class Fields {
|
|||
public static final int cj125CsPinMode_offset = 2225;
|
||||
public static final int cj125isLsu49_offset = 76;
|
||||
public static final int cj125isUaDivided_offset = 76;
|
||||
public static final int cj125isUrDivided_offset = 76;
|
||||
public static final int cj125SpiDevice_offset = 2224;
|
||||
public static final int cj125ua_offset = 2609;
|
||||
public static final int cj125ur_offset = 2610;
|
||||
|
@ -835,7 +836,6 @@ public class Fields {
|
|||
public static final int isManualSpinningMode_offset = 1476;
|
||||
public static final int isMapAveragingEnabled_offset = 1476;
|
||||
public static final int isSdCardEnabled_offset = 744;
|
||||
public static final int issue_294_15_offset = 76;
|
||||
public static final int issue_294_16_offset = 76;
|
||||
public static final int issue_294_17_offset = 76;
|
||||
public static final int issue_294_18_offset = 76;
|
||||
|
@ -1299,7 +1299,7 @@ public class Fields {
|
|||
public static final Field ETB1_USE_TWO_WIRES = Field.create("ETB1_USE_TWO_WIRES", 76, FieldType.BIT, 12);
|
||||
public static final Field ETB2_USE_TWO_WIRES = Field.create("ETB2_USE_TWO_WIRES", 76, FieldType.BIT, 13);
|
||||
public static final Field SHOWSDCARDWARNING = Field.create("SHOWSDCARDWARNING", 76, FieldType.BIT, 14);
|
||||
public static final Field ISSUE_294_15 = Field.create("ISSUE_294_15", 76, FieldType.BIT, 15);
|
||||
public static final Field CJ125ISURDIVIDED = Field.create("CJ125ISURDIVIDED", 76, FieldType.BIT, 15);
|
||||
public static final Field ISSUE_294_16 = Field.create("ISSUE_294_16", 76, FieldType.BIT, 16);
|
||||
public static final Field ISSUE_294_17 = Field.create("ISSUE_294_17", 76, FieldType.BIT, 17);
|
||||
public static final Field ISSUE_294_18 = Field.create("ISSUE_294_18", 76, FieldType.BIT, 18);
|
||||
|
@ -2083,7 +2083,7 @@ public class Fields {
|
|||
ETB1_USE_TWO_WIRES,
|
||||
ETB2_USE_TWO_WIRES,
|
||||
SHOWSDCARDWARNING,
|
||||
ISSUE_294_15,
|
||||
CJ125ISURDIVIDED,
|
||||
ISSUE_294_16,
|
||||
ISSUE_294_17,
|
||||
ISSUE_294_18,
|
||||
|
|
Loading…
Reference in New Issue