This commit is contained in:
rusefillc 2020-10-22 01:48:28 -04:00
parent 8c4dd19edd
commit 2a8a0f6af1
1 changed files with 24 additions and 8 deletions

View File

@ -18,6 +18,7 @@ EXTERN_CONFIG;
* has to be microRusEFI 0.5.2 * has to be microRusEFI 0.5.2
*/ */
void setVwPassatB6(DECLARE_CONFIG_PARAMETER_SIGNATURE) { void setVwPassatB6(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
#if (BOARD_TLE8888_COUNT > 0)
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR); setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2; engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
engineConfiguration->vvtMode = VVT_BOSCH_QUICK_START; engineConfiguration->vvtMode = VVT_BOSCH_QUICK_START;
@ -71,19 +72,33 @@ void setVwPassatB6(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->injectionPins[3] = GPIOE_0; engineConfiguration->injectionPins[3] = GPIOE_0;
engineConfiguration->gppwm[0].pwmFrequency = 25; gppwm_channel *lowPressureFuelPumpControl = &engineConfiguration->gppwm[1];
engineConfiguration->gppwm[0].loadAxis = GPPWM_FuelLoad; lowPressureFuelPumpControl->pwmFrequency = 20;
lowPressureFuelPumpControl->loadAxis = GPPWM_FuelLoad;
lowPressureFuelPumpControl->dutyIfError = 50;
setTable(lowPressureFuelPumpControl->table, (uint8_t)50);
// TLE8888_PIN_24: "43 - GP Out 4"
lowPressureFuelPumpControl->pin = TLE8888_PIN_24;
gppwm_channel *coolantControl = &engineConfiguration->gppwm[0];
coolantControl->pwmFrequency = 25;
coolantControl->loadAxis = GPPWM_FuelLoad;
// Volkswage wants 10% for fan to be OFF, between pull-up and low side control we need to invert that value
int value = 100 - 10;
coolantControl->dutyIfError = value;
setTable(coolantControl->table, (uint8_t)value);
// for now I just want to stop radiator whine // for now I just want to stop radiator whine
// todo: enable cooling! // 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 load = 0; load < GPPWM_LOAD_COUNT; load++) {
for (int r = 0; r < GPPWM_RPM_COUNT; r++) { for (int r = 0; r < GPPWM_RPM_COUNT; r++) {
engineConfiguration->gppwm[0].table[load][r] = 10; engineConfiguration->gppwm[0].table[load][r] = value;
} }
} }
*/
engineConfiguration->gppwm[0].pin = GPIOE_10; // "3 - Lowside 2" coolantControl->pin = GPIOE_10; // "3 - Lowside 2"
engineConfiguration->idle.solenoidPin = GPIO_UNASSIGNED; engineConfiguration->idle.solenoidPin = GPIO_UNASSIGNED;
@ -91,4 +106,5 @@ void setVwPassatB6(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
CONFIG(useETBforIdleControl) = true; CONFIG(useETBforIdleControl) = true;
engineConfiguration->crankingInjectionMode = IM_SEQUENTIAL; engineConfiguration->crankingInjectionMode = IM_SEQUENTIAL;
#endif /* BOARD_TLE8888_COUNT */
} }