rusefillc 2021-05-27 05:50:59 -04:00
parent 31a34a3ac2
commit 157732d5aa
2 changed files with 7 additions and 1 deletions

View File

@ -598,7 +598,10 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
#if EFI_SHAFT_POSITION_INPUT
// 248
tsOutputChannels->vvtPosition = engine->triggerCentral.getVVTPosition(0, 0);
tsOutputChannels->vvtPosition = engine->triggerCentral.getVVTPosition(/*bankIndex*/0, /*camIndex*/0);
tsOutputChannels->secondVvtPositionBank1 = engine->triggerCentral.getVVTPosition(/*bankIndex*/0, /*camIndex*/1);
tsOutputChannels->vvtPositionBank2 = engine->triggerCentral.getVVTPosition(/*bankIndex*/1, /*camIndex*/0);
tsOutputChannels->secondVvtPositionBank2 = engine->triggerCentral.getVVTPosition(/*bankIndex*/1, /*camIndex*/1);
#endif
// 252

View File

@ -79,6 +79,9 @@ int TriggerCentral::getHwEventCounter(int index) const {
EXTERN_ENGINE;
angle_t TriggerCentral::getVVTPosition(uint8_t bankIndex, uint8_t camIndex) {
if (bankIndex >= BANKS_COUNT || camIndex >= CAMS_PER_BANK) {
return NAN;
}
return vvtPosition[bankIndex][camIndex];
}