M62T vanos support #2243
This commit is contained in:
parent
adff68748c
commit
8d730b6ea9
|
@ -111,7 +111,7 @@ private:
|
|||
ValueProvider3D *table = nullptr;
|
||||
};
|
||||
|
||||
static AuxPidController instances[AUX_PID_COUNT];
|
||||
static AuxPidController instances[CAM_INPUTS_COUNT];
|
||||
|
||||
static void turnAuxPidOn(int index) {
|
||||
if (!isEnabled(index)) {
|
||||
|
@ -130,13 +130,13 @@ static void turnAuxPidOn(int index) {
|
|||
}
|
||||
|
||||
void startAuxPins() {
|
||||
for (int i = 0;i <AUX_PID_COUNT;i++) {
|
||||
for (int i = 0;i <CAM_INPUTS_COUNT;i++) {
|
||||
turnAuxPidOn(i);
|
||||
}
|
||||
}
|
||||
|
||||
void stopAuxPins() {
|
||||
for (int i = 0;i < AUX_PID_COUNT;i++) {
|
||||
for (int i = 0;i < CAM_INPUTS_COUNT;i++) {
|
||||
instances[i].auxOutputPin.deInit();
|
||||
}
|
||||
}
|
||||
|
@ -151,12 +151,12 @@ void initAuxPid(Logging *sharedLogger) {
|
|||
|
||||
logger = sharedLogger;
|
||||
|
||||
for (int i = 0;i < AUX_PID_COUNT;i++) {
|
||||
for (int i = 0;i < CAM_INPUTS_COUNT;i++) {
|
||||
instances[i].init(i);
|
||||
}
|
||||
|
||||
startAuxPins();
|
||||
for (int i = 0;i < AUX_PID_COUNT;i++) {
|
||||
for (int i = 0;i < CAM_INPUTS_COUNT;i++) {
|
||||
instances[i].Start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -214,8 +214,8 @@ static void setFsioDigitalInputPin(const char *indexStr, const char *pinName) {
|
|||
|
||||
static void setFsioPidOutputPin(const char *indexStr, const char *pinName) {
|
||||
int index = atoi(indexStr) - 1;
|
||||
if (index < 0 || index >= AUX_PID_COUNT) {
|
||||
scheduleMsg(logger, "invalid AUX index: %d", index);
|
||||
if (index < 0 || index >= CAM_INPUTS_COUNT) {
|
||||
scheduleMsg(logger, "invalid VVT index: %d", index);
|
||||
return;
|
||||
}
|
||||
brain_pin_e pin = parseBrainPin(pinName);
|
||||
|
@ -225,7 +225,7 @@ static void setFsioPidOutputPin(const char *indexStr, const char *pinName) {
|
|||
return;
|
||||
}
|
||||
engineConfiguration->auxPidPins[index] = pin;
|
||||
scheduleMsg(logger, "FSIO aux pin #%d [%s]", (index + 1), hwPortname(pin));
|
||||
scheduleMsg(logger, "VVT pid pin #%d [%s]", (index + 1), hwPortname(pin));
|
||||
}
|
||||
|
||||
static void showFsioInfo(void);
|
||||
|
@ -575,10 +575,10 @@ static void showFsioInfo(void) {
|
|||
showFsio("fan", radiatorFanLogic);
|
||||
showFsio("alt", alternatorLogic);
|
||||
|
||||
for (int i = 0; i < AUX_PID_COUNT ; i++) {
|
||||
for (int i = 0; i < CAM_INPUTS_COUNT ; i++) {
|
||||
brain_pin_e pin = engineConfiguration->auxPidPins[i];
|
||||
if (isBrainPinValid(pin)) {
|
||||
scheduleMsg(logger, "FSIO aux #%d [%s]", (i + 1),
|
||||
scheduleMsg(logger, "VVT pid #%d [%s]", (i + 1),
|
||||
hwPortname(pin));
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue