sensor_checker: getCodeFor*() idx argument is zero-based (#5563)

This commit is contained in:
Andrey G 2023-09-11 14:07:43 +03:00 committed by GitHub
parent e5f7c9885c
commit cb24ea2bca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -187,11 +187,11 @@ void SensorChecker::onSlowCallback() {
auto diag = pin.getDiag();
if (diag != PIN_OK && diag != PIN_INVALID) {
withInjectorIssues = true;
auto code = getCodeForInjector(i + 1, diag);
auto code = getCodeForInjector(i, diag);
char description[32];
pinDiag2string(description, efi::size(description), diag);
warning(code, "Injector %d fault: %s", i, description);
warning(code, "Injector %d fault: %s", i + 1, description);
}
}
engine->fuelComputer.injectorHwIssue = withInjectorIssues;
@ -207,11 +207,11 @@ void SensorChecker::onSlowCallback() {
auto diag = pin.getDiag();
if (diag != PIN_OK && diag != PIN_INVALID) {
auto code = getCodeForIgnition(i + 1, diag);
auto code = getCodeForIgnition(i, diag);
char description[32];
pinDiag2string(description, efi::size(description), diag);
warning(code, "Ignition %d fault: %s", i, description);
warning(code, "Ignition %d fault: %s", i + 1, description);
}
}
#endif // BOARD_EXT_GPIOCHIPS > 0