Merge branch 'master' of https://github.com/rusefi/rusefi
This commit is contained in:
commit
81cbc99fc6
|
@ -24,7 +24,7 @@ jobs:
|
|||
- name: Build Native Unit Tests as shared library
|
||||
working-directory: ./unit_tests/
|
||||
# we have a unit test of JNI thus we need to build shared library
|
||||
run: make -j4
|
||||
run: make -j4 SANITIZE=no build/lib_rusefi_test
|
||||
|
||||
- name: Build Android
|
||||
env:
|
||||
|
|
|
@ -23,6 +23,7 @@ jobs:
|
|||
hellen72,
|
||||
hellen81,
|
||||
hellen88bmw,
|
||||
hellen88bmw_avr,
|
||||
hellen-nb1,
|
||||
hellen-gm-e67,
|
||||
hellenNA8_96,
|
||||
|
@ -82,6 +83,10 @@ jobs:
|
|||
folder: hellen/hellen88bmw
|
||||
ini-file: rusefi_hellen88bmw.ini
|
||||
|
||||
- build-target: hellen88bmw_avr
|
||||
folder: hellen/hellen88bmw
|
||||
ini-file: rusefi_hellen88bmw.ini
|
||||
|
||||
- build-target: hellen-nb1
|
||||
folder: hellen/hellen-nb1
|
||||
ini-file: rusefi_hellen-nb1.ini
|
||||
|
|
|
@ -31,8 +31,8 @@ jobs:
|
|||
|
||||
- name: Build Native Unit Tests as shared library
|
||||
working-directory: ./unit_tests/
|
||||
# we have a unit test of JNI thus we need to build shared library
|
||||
run: make -j4
|
||||
# we have a unit test of JNI thus we need to build shared library
|
||||
run: make -j4 SANITIZE=no build/lib_rusefi_test
|
||||
|
||||
- name: Test console
|
||||
# at the moment 'jar' task does not depend on tests?! maybe because tests take some time?
|
||||
|
|
|
@ -17,7 +17,6 @@ DDEFS += -DTS_NO_PRIMARY=1
|
|||
|
||||
# Add them all together
|
||||
DDEFS += -DFIRMWARE_ID=\"hellen88bmw\" $(VAR_DEF_ENGINE_TYPE)
|
||||
DDEFS += -DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE
|
||||
|
||||
DDEFS += -DSHORT_BOARD_NAME=hellen88bmw
|
||||
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd ..
|
||||
|
||||
export EXTRA_PARAMS="-DDUMMY \
|
||||
-DEFI_SOFTWARE_KNOCK=TRUE -DSTM32_ADC_USE_ADC3=TRUE \
|
||||
"
|
||||
|
||||
bash ../common_make.sh hellen/hellen88bmw ARCH_STM32F4
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd ..
|
||||
|
||||
export EXTRA_PARAMS="-DDUMMY \
|
||||
-DEFI_SOFTWARE_KNOCK=FALSE \
|
||||
-DHAL_TRIGGER_USE_ADC=TRUE \
|
||||
-DSTM32_ADC_USE_ADC3=TRUE \
|
||||
"
|
||||
|
||||
|
||||
bash ../common_make.sh hellen/hellen88bmw ARCH_STM32F4
|
|
@ -1,2 +1,2 @@
|
|||
#pragma once
|
||||
#define VCS_DATE 20220726
|
||||
#define VCS_DATE 20220727
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3411226166
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.48way.3411226166"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.48way.3411226166"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3698599545
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.all.3698599545"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.all.3698599545"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3999709973
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.alphax-2chan.3999709973"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.alphax-2chan.3999709973"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 4294494522
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.alphax-4chan.4294494522"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.alphax-4chan.4294494522"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3233731422
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.atlas.3233731422"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.atlas.3233731422"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 714635136
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.core8.714635136"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.core8.714635136"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3698599545
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.f407-discovery.3698599545"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.f407-discovery.3698599545"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3698599545
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.f429-discovery.3698599545"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.f429-discovery.3698599545"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 2652428989
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.frankenso_na6.2652428989"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.frankenso_na6.2652428989"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 2828564742
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.harley81.2828564742"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.harley81.2828564742"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 4252710684
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.hellen-gm-e67.4252710684"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.hellen-gm-e67.4252710684"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 100603829
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.hellen-nb1.100603829"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.hellen-nb1.100603829"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 1420467859
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.hellen121nissan.1420467859"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.hellen121nissan.1420467859"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 2891310339
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.hellen121vag.2891310339"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.hellen121vag.2891310339"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 345361816
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.hellen128.345361816"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.hellen128.345361816"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 1144739069
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.hellen154hyundai.1144739069"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.hellen154hyundai.1144739069"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 776671101
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.hellen72.776671101"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.hellen72.776671101"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 4274126451
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.hellen81.4274126451"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.hellen81.4274126451"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 2816990124
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.hellen88bmw.2816990124"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.hellen88bmw.2816990124"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 1593825049
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.hellenNA6.1593825049"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.hellenNA6.1593825049"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3738041417
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.hellenNA8_96.3738041417"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.hellenNA8_96.3738041417"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 2572707955
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.hellen_cypress.2572707955"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.hellen_cypress.2572707955"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3340439550
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.kin.3340439550"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.kin.3340439550"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 329427599
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.mre_f4.329427599"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.mre_f4.329427599"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 329427599
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.mre_f7.329427599"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.mre_f7.329427599"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 2359230367
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.prometheus_405.2359230367"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.prometheus_405.2359230367"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 2359230367
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.prometheus_469.2359230367"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.prometheus_469.2359230367"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 2042224911
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.proteus_f4.2042224911"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.proteus_f4.2042224911"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 2042224911
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.proteus_f7.2042224911"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.proteus_f7.2042224911"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 2042224911
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.proteus_h7.2042224911"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.proteus_h7.2042224911"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 3613777867
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.subaru_eg33_f7.3613777867"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.subaru_eg33_f7.3613777867"
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
//
|
||||
|
||||
#define SIGNATURE_HASH 1987897389
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.26.tdg-pdm8.1987897389"
|
||||
#define TS_SIGNATURE "rusEFI 2022.07.27.tdg-pdm8.1987897389"
|
||||
|
|
|
@ -13,6 +13,14 @@
|
|||
#define ADC_MAX_CHANNELS_COUNT 16
|
||||
#endif /* ADC_MAX_CHANNELS_COUNT */
|
||||
|
||||
#ifndef SLOW_ADC_CHANNEL_COUNT
|
||||
#ifdef ADC_MUX_PIN
|
||||
#define SLOW_ADC_CHANNEL_COUNT 32
|
||||
#else // not ADC_MUX_PIN
|
||||
#define SLOW_ADC_CHANNEL_COUNT 16
|
||||
#endif // def ADC_MUX_PIN
|
||||
#endif // SLOW_ADC_CHANNEL_COUNT
|
||||
|
||||
// this structure contains one multi-channel ADC state snapshot
|
||||
typedef struct {
|
||||
volatile adcsample_t adc_data[ADC_MAX_CHANNELS_COUNT];
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
#define ADC_BUF_DEPTH_FAST 4
|
||||
#endif
|
||||
|
||||
static NO_CACHE adcsample_t slowAdcSamples[ADC_MAX_CHANNELS_COUNT];
|
||||
static NO_CACHE adcsample_t slowAdcSamples[SLOW_ADC_CHANNEL_COUNT];
|
||||
static NO_CACHE adcsample_t fastAdcSampleBuf[ADC_BUF_DEPTH_FAST * ADC_MAX_CHANNELS_COUNT];
|
||||
|
||||
static adc_channel_mode_e adcHwChannelEnabled[HW_MAX_ADC_INDEX];
|
||||
|
|
|
@ -13,10 +13,18 @@
|
|||
/* Depth of the conversion buffer, channels are sampled X times each.*/
|
||||
#define SLOW_ADC_OVERSAMPLE 8
|
||||
|
||||
#ifdef ADC_MUX_PIN
|
||||
static OutputPin muxControl;
|
||||
#endif // ADC_MUX_PIN
|
||||
|
||||
void portInitAdc() {
|
||||
// Init slow ADC
|
||||
adcStart(&ADCD1, NULL);
|
||||
|
||||
#ifdef ADC_MUX_PIN
|
||||
muxControl.initPin("ADC Mux", ADC_MUX_PIN);
|
||||
#endif //ADC_MUX_PIN
|
||||
|
||||
#if EFI_USE_FAST_ADC
|
||||
// Init fast ADC (MAP sensor)
|
||||
adcStart(&ADCD2, NULL);
|
||||
|
@ -108,14 +116,14 @@ float getMcuTemperature() {
|
|||
#define ADC_SAMPLING_SLOW ADC_SAMPLE_56
|
||||
#define ADC_SAMPLING_FAST ADC_SAMPLE_28
|
||||
|
||||
// Slow ADC has 16 channels we can sample
|
||||
constexpr size_t slowChannelCount = 16;
|
||||
// Slow ADC has 16 channels we can sample, or 32 if ADC mux mode is enabled.
|
||||
constexpr size_t adcChannelCount = 16;
|
||||
|
||||
// Conversion group for slow channels
|
||||
// This simply samples every channel in sequence
|
||||
static constexpr ADCConversionGroup convGroupSlow = {
|
||||
.circular = FALSE,
|
||||
.num_channels = slowChannelCount,
|
||||
.num_channels = adcChannelCount,
|
||||
.end_cb = nullptr,
|
||||
.error_cb = nullptr,
|
||||
/* HW dependent part.*/
|
||||
|
@ -148,9 +156,9 @@ static constexpr ADCConversionGroup convGroupSlow = {
|
|||
.sqr3 = ADC_SQR3_SQ1_N(0) | ADC_SQR3_SQ2_N(1) | ADC_SQR3_SQ3_N(2) | ADC_SQR3_SQ4_N(3) | ADC_SQR3_SQ5_N(4) | ADC_SQR3_SQ6_N(5), // Conversion group sequence 1...6
|
||||
};
|
||||
|
||||
static NO_CACHE adcsample_t slowSampleBuffer[SLOW_ADC_OVERSAMPLE * slowChannelCount];
|
||||
static NO_CACHE adcsample_t slowSampleBuffer[SLOW_ADC_OVERSAMPLE * adcChannelCount];
|
||||
|
||||
bool readSlowAnalogInputs(adcsample_t* convertedSamples) {
|
||||
bool readBatch(adcsample_t* convertedSamples, size_t start) {
|
||||
msg_t result = adcConvert(&ADCD1, &convGroupSlow, slowSampleBuffer, SLOW_ADC_OVERSAMPLE);
|
||||
|
||||
// If something went wrong - try again later
|
||||
|
@ -159,21 +167,36 @@ bool readSlowAnalogInputs(adcsample_t* convertedSamples) {
|
|||
}
|
||||
|
||||
// Average samples to get some noise filtering and oversampling
|
||||
for (size_t i = 0; i < slowChannelCount; i++) {
|
||||
for (size_t i = 0; i < adcChannelCount; i++) {
|
||||
uint32_t sum = 0;
|
||||
size_t index = i;
|
||||
for (size_t j = 0; j < SLOW_ADC_OVERSAMPLE; j++) {
|
||||
sum += slowSampleBuffer[index];
|
||||
index += slowChannelCount;
|
||||
index += adcChannelCount;
|
||||
}
|
||||
|
||||
adcsample_t value = static_cast<adcsample_t>(sum / SLOW_ADC_OVERSAMPLE);
|
||||
convertedSamples[i] = value;
|
||||
convertedSamples[start + i] = value;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool readSlowAnalogInputs(adcsample_t* convertedSamples) {
|
||||
bool result = true;
|
||||
|
||||
result &= readBatch(convertedSamples, 0);
|
||||
|
||||
#ifdef ADC_MUX_PIN
|
||||
muxControl.setValue(1);
|
||||
// read the second batch, starting where we left off
|
||||
result &= readBatch(convertedSamples, adcChannelCount);
|
||||
muxControl.setValue(0);
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#if EFI_USE_FAST_ADC
|
||||
|
||||
#include "AdcConfiguration.h"
|
||||
|
|
|
@ -10,6 +10,10 @@
|
|||
#include "mpu_util.h"
|
||||
#include "map_averaging.h"
|
||||
|
||||
#ifdef ADC_MUX_PIN
|
||||
#error "ADC mux not yet supported on STM32H7"
|
||||
#endif
|
||||
|
||||
#ifndef H7_ADC_SPEED
|
||||
#define H7_ADC_SPEED (10000)
|
||||
#endif
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
// This file was generated by Version2Header
|
||||
// Mon Jul 25 00:24:29 UTC 2022
|
||||
// Wed Jul 27 00:25:27 UTC 2022
|
||||
|
||||
|
||||
#ifndef GIT_HASH
|
||||
#define GIT_HASH "17261ab981d67348600bb359b0e3bd5cec13383e"
|
||||
#define GIT_HASH "026a28d651f4a76c70eff8ae2532510efa3f5b37"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef VCS_VERSION
|
||||
#define VCS_VERSION "42745"
|
||||
#define VCS_VERSION "42929"
|
||||
#endif
|
||||
|
|
|
@ -89,7 +89,7 @@ VPATH = $(SRCPATHS)
|
|||
# Makefile rules
|
||||
#
|
||||
|
||||
all: $(OBJS) $(BINARY_OUTPUT) $(SHARED_OUTPUT) MAKE_ALL_RULE_HOOK
|
||||
all: $(OBJS) $(BINARY_OUTPUT) MAKE_ALL_RULE_HOOK
|
||||
|
||||
MAKE_ALL_RULE_HOOK:
|
||||
|
||||
|
|
|
@ -14,11 +14,13 @@ PCHSUB = unit_tests
|
|||
|
||||
include $(PROJECT_DIR)/rusefi_rules.mk
|
||||
|
||||
ifneq ($(OS),Windows_NT)
|
||||
# at the moment lib asan breaks JNI library
|
||||
SANITIZE = no
|
||||
else
|
||||
# User may want to pass in a forced value for SANITIZE
|
||||
ifeq ($(SANITIZE),)
|
||||
ifneq ($(OS),Windows_NT)
|
||||
SANITIZE = yes
|
||||
else
|
||||
SANITIZE = no
|
||||
endif
|
||||
endif
|
||||
|
||||
IS_MAC = no
|
||||
|
|
Loading…
Reference in New Issue