M62T vanos support #2243

This commit is contained in:
rusefillc 2021-02-10 21:44:21 -05:00
parent 78c7cfe896
commit d87a38541e
4 changed files with 2 additions and 23 deletions

View File

@ -381,7 +381,6 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
// engineConfiguration->clutchUpPin = GPIOA_14; // note SWCLK - conflict with SWD // engineConfiguration->clutchUpPin = GPIOA_14; // note SWCLK - conflict with SWD
engineConfiguration->clutchUpPinMode = PI_PULLUP; engineConfiguration->clutchUpPinMode = PI_PULLUP;
engineConfiguration->activateAuxPid1 = true;
engineConfiguration->auxPidPins[0] = GPIOD_5; // playing with AUX PID for alternator engineConfiguration->auxPidPins[0] = GPIOD_5; // playing with AUX PID for alternator
engineConfiguration->auxPidFrequency[0] = 300; engineConfiguration->auxPidFrequency[0] = 300;

View File

@ -276,8 +276,6 @@ void setMazdaNB2VVTSettings(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
engineConfiguration->auxPid[0].offset = 33; engineConfiguration->auxPid[0].offset = 33;
engineConfiguration->auxPid[0].minValue = 24; engineConfiguration->auxPid[0].minValue = 24;
engineConfiguration->auxPid[0].maxValue = 44; engineConfiguration->auxPid[0].maxValue = 44;
engineConfiguration->activateAuxPid1 = true; // todo: remove this field?
} }
static void setMazdaMiataEngineNB2Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) { static void setMazdaMiataEngineNB2Defaults(DECLARE_CONFIG_PARAMETER_SIGNATURE) {

View File

@ -166,7 +166,6 @@ void vag_18_Turbo(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
// VVT Settings // VVT Settings
engineConfiguration->activateAuxPid1 = true;
engineConfiguration->auxPidFrequency[0] = 300; engineConfiguration->auxPidFrequency[0] = 300;
engineConfiguration->fsio_setting[0] = 0.0; engineConfiguration->fsio_setting[0] = 0.0;
engineConfiguration->auxPid[0].pFactor = 2; engineConfiguration->auxPid[0].pFactor = 2;

View File

@ -36,20 +36,6 @@ static fsio8_Map3D_u8t vvtTable2("vvt#2");
static Logging *logger; static Logging *logger;
static bool isEnabled(int index) {
// todo: implement bit arrays for configuration
switch(index) {
case 0:
return engineConfiguration->activateAuxPid1;
case 1:
return engineConfiguration->activateAuxPid2;
case 2:
return engineConfiguration->activateAuxPid3;
default:
return engineConfiguration->activateAuxPid4;
}
}
class AuxPidController : public PeriodicTimerController { class AuxPidController : public PeriodicTimerController {
public: public:
@ -114,10 +100,6 @@ private:
static AuxPidController instances[CAM_INPUTS_COUNT]; static AuxPidController instances[CAM_INPUTS_COUNT];
static void turnAuxPidOn(int index) { static void turnAuxPidOn(int index) {
if (!isEnabled(index)) {
return;
}
if (!isBrainPinValid(engineConfiguration->auxPidPins[index])) { if (!isBrainPinValid(engineConfiguration->auxPidPins[index])) {
return; return;
} }
@ -126,7 +108,8 @@ static void turnAuxPidOn(int index) {
&engine->executor, &engine->executor,
engineConfiguration->auxPidPins[index], engineConfiguration->auxPidPins[index],
&instances[index].auxOutputPin, &instances[index].auxOutputPin,
engineConfiguration->auxPidFrequency[index], 0.1); // todo: do we need two separate frequencies?
engineConfiguration->auxPidFrequency[0], 0.1);
} }
void startAuxPins() { void startAuxPins() {