This commit is contained in:
rusefi 2020-10-22 00:57:11 -04:00
parent ef19d30314
commit e12e3f9dc6
2 changed files with 14 additions and 0 deletions

View File

@ -8,6 +8,7 @@
#include "engine.h"
#include "vw_b6.h"
#include "custom_engine.h"
#include "table_helper.h"
EXTERN_CONFIG;
@ -75,6 +76,7 @@ void setVwPassatB6(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
// for now I just want to stop radiator whine
// todo: enable cooling!
engineConfiguration->gppwm[0].dutyIfError = 10;
setTable(engineConfiguration->gppwm[0].table, (uint8_t)10);
for (int load = 0; load < GPPWM_LOAD_COUNT; load++) {
for (int r = 0; r < GPPWM_RPM_COUNT; r++) {
engineConfiguration->gppwm[0].table[load][r] = 10;
@ -86,4 +88,7 @@ void setVwPassatB6(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
engineConfiguration->fanPin = GPIO_UNASSIGNED;
CONFIG(useETBforIdleControl) = true;
engineConfiguration->crankingInjectionMode = IM_SEQUENTIAL;
}

View File

@ -119,4 +119,13 @@ void setArrayValues(TValue (&array)[TSize], TValue value) {
}
}
template <typename TElement, size_t N, size_t M>
constexpr void setTable(TElement (&dest)[N][M], const TElement value) {
for (size_t n = 0; n < N; n++) {
for (size_t m = 0; m < M; m++) {
dest[n][m] = value;
}
}
}
void setRpmTableBin(float array[], int size);