Skip to content

Commit

Permalink
gppwm, clutch pin
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Aug 30, 2023
1 parent f8db12b commit b7667b7
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions firmware/config/engines/mazda_miata_vvt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ void setMiataNbPolygonusCommon() {
engineConfiguration->fan2Pin = PROTEUS_LS_5;
engineConfiguration->enableFan2WithAc = true;

engineConfiguration->clutchDownPin = getAdcChannelBrainPin("", PROTEUS_IN_ANALOG_VOLT_5);
engineConfiguration->clutchDownPin = PROTEUS_DIGITAL_4;
engineConfiguration->clutchDownPinInverted = true;

engineConfiguration->brakePedalPin = getAdcChannelBrainPin("", PROTEUS_IN_ANALOG_VOLT_5);
Expand Down Expand Up @@ -781,10 +781,20 @@ void setMiataNB1_Polygonus() {
engineConfiguration->lowPressureFuel.v2 = 4.5;
engineConfiguration->lowPressureFuel.value2 = 689.5;

// GPPWM1:
// GPPWM1: VICS variable intake flap
engineConfiguration->gppwm[0].pin = PROTEUS_LS_16;
engineConfiguration->gppwm[0].pwmFrequency = 0;
engineConfiguration->gppwm[0].loadAxis = GPPWM_Tps;
engineConfiguration->gppwm[0].onAboveDuty = 60;
engineConfiguration->gppwm[0].offBelowDuty = 40;
strcpy(engineConfiguration->gpPwmNote[0], "VICS");
copyArray(engineConfiguration->gppwm[0].rpmBins, { 0, 1000, 2000, 2500, 3500, 5500, 6500, 7000 });
for (size_t i = 0; i < efi::size(engineConfiguration->gppwm[0].table); i++)
{
// Set the 3500 and 5500 rpm columns to 100
engineConfiguration->gppwm[0].table[i][4] = 100;
engineConfiguration->gppwm[0].table[i][5] = 100;
}
}

void setMiataNB2_Polygonus() {
Expand Down

0 comments on commit b7667b7

Please sign in to comment.