cj125isUaDivided parameter
This commit is contained in:
parent
4add73e360
commit
5497522d00
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Jun 16 08:40:30 EDT 2018
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 17 14:48:08 EDT 2018
|
||||
// begin
|
||||
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
||||
#define ENGINE_CONFIGURATION_GENERATED_H_
|
||||
|
@ -915,7 +915,7 @@ typedef struct {
|
|||
bool useBiQuadAnalogFiltering : 1;
|
||||
/**
|
||||
offset 76 bit 10 */
|
||||
bool issue_294_10 : 1;
|
||||
bool cj125isUaDivided : 1;
|
||||
/**
|
||||
offset 76 bit 11 */
|
||||
bool issue_294_11 : 1;
|
||||
|
@ -2388,4 +2388,4 @@ typedef struct {
|
|||
|
||||
#endif
|
||||
// end
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Jun 16 08:40:30 EDT 2018
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 17 14:48:08 EDT 2018
|
||||
|
|
|
@ -102,8 +102,8 @@
|
|||
#define isVerboseAuxPid4_offset_hex 4c
|
||||
#define useBiQuadAnalogFiltering_offset 76
|
||||
#define useBiQuadAnalogFiltering_offset_hex 4c
|
||||
#define issue_294_10_offset 76
|
||||
#define issue_294_10_offset_hex 4c
|
||||
#define cj125isUaDivided_offset 76
|
||||
#define cj125isUaDivided_offset_hex 4c
|
||||
#define issue_294_11_offset 76
|
||||
#define issue_294_11_offset_hex 4c
|
||||
#define issue_294_12_offset 76
|
||||
|
|
|
@ -733,5 +733,5 @@ int getRusEfiVersion(void) {
|
|||
if (initBootloader() != 0)
|
||||
return 123;
|
||||
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
||||
return 20180612;
|
||||
return 20180617;
|
||||
}
|
||||
|
|
|
@ -137,8 +137,14 @@ static float getUr() {
|
|||
}
|
||||
|
||||
static float getUa() {
|
||||
if (CONFIG(cj125ua) != EFI_ADC_NONE)
|
||||
return getVoltageDivided("cj125ua", CONFIG(cj125ua));
|
||||
if (CONFIG(cj125ua) != EFI_ADC_NONE) {
|
||||
if (engineConfiguration->cj125isUaDivided) {
|
||||
return getVoltageDivided("cj125ua", CONFIG(cj125ua));
|
||||
} else {
|
||||
return getVoltage("cj125ua", CONFIG(cj125ua));
|
||||
}
|
||||
}
|
||||
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
@ -357,6 +363,28 @@ static void cjInitPid(void) {
|
|||
heaterPid.reset();
|
||||
}
|
||||
|
||||
// engineConfiguration->spi2SckMode = PAL_STM32_OTYPE_OPENDRAIN; // 4
|
||||
// engineConfiguration->spi2MosiMode = PAL_STM32_OTYPE_OPENDRAIN; // 4
|
||||
// engineConfiguration->spi2MisoMode = PAL_STM32_PUDR_PULLUP; // 32
|
||||
// boardConfiguration->cj125CsPin = GPIOA_15;
|
||||
// engineConfiguration->cj125CsPinMode = OM_OPENDRAIN;
|
||||
|
||||
void cj125defaultPinout() {
|
||||
engineConfiguration->cj125ua = EFI_ADC_9;
|
||||
engineConfiguration->cj125ur = EFI_ADC_12;
|
||||
boardConfiguration->wboHeaterPin = GPIOC_13;
|
||||
|
||||
boardConfiguration->isCJ125Enabled = false;
|
||||
|
||||
boardConfiguration->spi2mosiPin = GPIOB_15;
|
||||
boardConfiguration->spi2misoPin = GPIOB_14;
|
||||
boardConfiguration->spi2sckPin = GPIOB_13;
|
||||
|
||||
boardConfiguration->cj125CsPin = GPIOB_0;
|
||||
boardConfiguration->isCJ125Enabled = true;
|
||||
boardConfiguration->is_enabled_spi_2 = true;
|
||||
}
|
||||
|
||||
static void cjStartSpi(void) {
|
||||
cj125spicfg.ssport = getHwPort("cj125", boardConfiguration->cj125CsPin);
|
||||
cj125spicfg.sspad = getHwPin("cj125", boardConfiguration->cj125CsPin);
|
||||
|
|
|
@ -173,5 +173,6 @@ void initCJ125(Logging *shared);
|
|||
void cjPostState(TunerStudioOutputChannels *tsOutputChannels);
|
||||
float cjGetAfr(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
bool cjHasAfrSensor(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void cj125defaultPinout();
|
||||
|
||||
#endif /* HW_LAYER_SENSORS_CJ125_H_ */
|
||||
|
|
|
@ -255,7 +255,7 @@ bit isVerboseAuxPid3;
|
|||
bit activateAuxPid4;
|
||||
bit isVerboseAuxPid4;
|
||||
bit useBiQuadAnalogFiltering;
|
||||
bit issue_294_10;
|
||||
bit cj125isUaDivided;
|
||||
bit issue_294_11;
|
||||
bit issue_294_12;
|
||||
bit issue_294_13;
|
||||
|
|
|
@ -63,7 +63,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sat Jun 16 08:07:00 EDT 2018
|
||||
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 17 14:48:08 EDT 2018
|
||||
|
||||
pageSize = 20000
|
||||
page = 1
|
||||
|
@ -82,7 +82,7 @@ page = 1
|
|||
activateAuxPid4 = bits, U32, 76, [7:7], "false", "true"
|
||||
isVerboseAuxPid4 = bits, U32, 76, [8:8], "false", "true"
|
||||
useBiQuadAnalogFiltering= bits, U32, 76, [9:9], "false", "true"
|
||||
issue_294_10 = bits, U32, 76, [10:10], "false", "true"
|
||||
cj125isUaDivided = bits, U32, 76, [10:10], "false", "true"
|
||||
issue_294_11 = bits, U32, 76, [11:11], "false", "true"
|
||||
issue_294_12 = bits, U32, 76, [12:12], "false", "true"
|
||||
issue_294_13 = bits, U32, 76, [13:13], "false", "true"
|
||||
|
@ -2519,6 +2519,7 @@ cmd_stop_engine = "w\x00\x99\x00\x00"
|
|||
field = "Heater pin", wboHeaterPin, {isCJ125Enabled == 1}
|
||||
field = "UA input", cj125ua, {isCJ125Enabled == 1}
|
||||
field = "UR input", cj125ur, {isCJ125Enabled == 1}
|
||||
field = "Is UA input divided?" cj125isUaDivided, {isCJ125Enabled == 1}
|
||||
|
||||
dialog = spiFunction, "SPI settings"
|
||||
field = "!ECU reboot needed to apply these settings"
|
||||
|
|
|
@ -1680,6 +1680,7 @@ cmd_stop_engine = "w\x00\x99\x00\x00"
|
|||
field = "Heater pin", wboHeaterPin, {isCJ125Enabled == 1}
|
||||
field = "UA input", cj125ua, {isCJ125Enabled == 1}
|
||||
field = "UR input", cj125ur, {isCJ125Enabled == 1}
|
||||
field = "Is UA input divided?" cj125isUaDivided, {isCJ125Enabled == 1}
|
||||
|
||||
dialog = spiFunction, "SPI settings"
|
||||
field = "!ECU reboot needed to apply these settings"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config;
|
||||
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Thu Apr 26 02:12:36 EDT 2018
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 17 14:48:08 EDT 2018
|
||||
public class Fields {
|
||||
public static final int LE_COMMAND_LENGTH = 200;
|
||||
public static final int BLOCKING_FACTOR = 400;
|
||||
|
@ -67,7 +67,7 @@ public class Fields {
|
|||
public static final int activateAuxPid4_offset = 76;
|
||||
public static final int isVerboseAuxPid4_offset = 76;
|
||||
public static final int useBiQuadAnalogFiltering_offset = 76;
|
||||
public static final int issue_294_10_offset = 76;
|
||||
public static final int cj125isUaDivided_offset = 76;
|
||||
public static final int issue_294_11_offset = 76;
|
||||
public static final int issue_294_12_offset = 76;
|
||||
public static final int issue_294_13_offset = 76;
|
||||
|
@ -1186,7 +1186,7 @@ public class Fields {
|
|||
public static final Field ACTIVATEAUXPID4 = Field.create("ACTIVATEAUXPID4", 76, FieldType.BIT, 7);
|
||||
public static final Field ISVERBOSEAUXPID4 = Field.create("ISVERBOSEAUXPID4", 76, FieldType.BIT, 8);
|
||||
public static final Field USEBIQUADANALOGFILTERING = Field.create("USEBIQUADANALOGFILTERING", 76, FieldType.BIT, 9);
|
||||
public static final Field ISSUE_294_10 = Field.create("ISSUE_294_10", 76, FieldType.BIT, 10);
|
||||
public static final Field CJ125ISUADIVIDED = Field.create("CJ125ISUADIVIDED", 76, FieldType.BIT, 10);
|
||||
public static final Field ISSUE_294_11 = Field.create("ISSUE_294_11", 76, FieldType.BIT, 11);
|
||||
public static final Field ISSUE_294_12 = Field.create("ISSUE_294_12", 76, FieldType.BIT, 12);
|
||||
public static final Field ISSUE_294_13 = Field.create("ISSUE_294_13", 76, FieldType.BIT, 13);
|
||||
|
|
Loading…
Reference in New Issue