Merge remote-tracking branch 'origin/master'

This commit is contained in:
rusefi 2020-05-10 10:12:50 -04:00
commit 6086a8c6f8
3 changed files with 11 additions and 6 deletions

View File

@ -18,10 +18,13 @@ else
BOARDINC += $(PROJECT_DIR)/config/stm32f7ems # efifeatures/halconf/chconf.h
LDSCRIPT= $(BOARDS_DIR)/nucleo_f767/STM32F76xxI.ld
CONFDIR=config/stm32f4ems
PROTEUS_LEGACY=TRUE
endif
# Override DEFAULT_ENGINE_TYPE
DDEFS += $(MCU_DEFS) -DEFI_USE_OSC=TRUE -DEFI_FATAL_ERROR_PIN=GPIOE_3 -DFIRMWARE_ID=\"proteus\" -DDEFAULT_ENGINE_TYPE=PROTEUS -DUSE_ADC3_VBATT_HACK -DSTM32_ADC_USE_ADC3=TRUE -DEFI_INCLUDE_ENGINE_PRESETS=FALSE -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_PAL=TRUE -DEFI_VEHICLE_SPEED=FALSE -DEFI_LOGIC_ANALYZER=FALSE
DDEFS += $(MCU_DEFS) -DEFI_USE_OSC=TRUE -DEFI_FATAL_ERROR_PIN=GPIOE_3 -DFIRMWARE_ID=\"proteus\" -DDEFAULT_ENGINE_TYPE=PROTEUS -DSTM32_ADC_USE_ADC3=TRUE -DEFI_INCLUDE_ENGINE_PRESETS=FALSE -DEFI_ICU_INPUTS=FALSE -DHAL_TRIGGER_USE_PAL=TRUE -DEFI_VEHICLE_SPEED=FALSE -DEFI_LOGIC_ANALYZER=FALSE
# Proteus <=v0.2 needs ADC hack - vbatt is on ADC3
ifeq ($(PROTEUS_LEGACY),TRUE)
DDEFS += -DUSE_ADC3_VBATT_HACK
endif

View File

@ -78,7 +78,9 @@ static void setupVbatt() {
// 82k high side/10k low side = 9.2
engineConfiguration->vbattDividerCoeff = (92.0f / 10.0f);
//engineConfiguration->vbattAdcChannel = TODO;
// Battery sense on PA7
engineConfiguration->vbattAdcChannel = EFI_ADC_7;
engineConfiguration->adcVcc = 3.3f;
}

View File

@ -73,7 +73,7 @@ analog_inputs:
# PA6 - pin #18
EFI_ADC_6: "Analog Volt 11"
# PA7
EFI_ADC_7: "Analog Volt 12"
EFI_ADC_7: "Battery Sense"
# CLT = Analog Temp 3 = PB0
EFI_ADC_8: "Analog Temp 3"
# PB1