bench test 33810 module #5745
This commit is contained in:
parent
4498146cc9
commit
708ca995de
|
@ -185,7 +185,14 @@ static const struct mc33810_config mc33810 = {
|
|||
};
|
||||
|
||||
if (engineConfiguration->engineType == engine_type_e::FRANKENSO_TEST_33810) {
|
||||
mc33810_add(Gpio::MC33810_0_OUT_0, 0, &mc33810);
|
||||
int ret = mc33810_add(Gpio::MC33810_0_OUT_0, 0, &mc33810);
|
||||
efiPrintf("mc33810_add %d", ret);
|
||||
|
||||
|
||||
// todo: add to more appropriate location?
|
||||
addConsoleAction("injinfo", [](){
|
||||
efiPrintf("injinfo index=%d", engine->fuelComputer.brokenInjector);
|
||||
});
|
||||
}
|
||||
#endif // HW_FRANKENSO
|
||||
}
|
||||
|
|
|
@ -26,5 +26,6 @@ struct_no_prefix fuel_computer_s
|
|||
float sdAirMassInOneCylinder;@@GAUGE_NAME_AIR_MASS@@;"g",1, 0, 0, 0, 3
|
||||
float normalizedCylinderFilling;Air: Normalized cyl filling;"%", 1, 0, 0, 100, 1
|
||||
|
||||
uint8_t brokenInjector
|
||||
bit injectorHwIssue
|
||||
end_struct
|
||||
|
|
|
@ -124,7 +124,7 @@ static void check(SensorType type) {
|
|||
#if BOARD_EXT_GPIOCHIPS > 0 && EFI_PROD_CODE
|
||||
#if EFI_ENGINE_CONTROL
|
||||
static ObdCode getCodeForInjector(int idx, brain_pin_diag_e diag) {
|
||||
if (idx < 0 || idx >= 12) {
|
||||
if (idx < 0 || idx >= MAX_CYLINDER_COUNT) {
|
||||
return ObdCode::None;
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ static ObdCode getCodeForInjector(int idx, brain_pin_diag_e diag) {
|
|||
#endif // EFI_ENGINE_CONTROL
|
||||
|
||||
static ObdCode getCodeForIgnition(int idx, brain_pin_diag_e diag) {
|
||||
if (idx < 0 || idx >= 12) {
|
||||
if (idx < 0 || idx >= MAX_CYLINDER_COUNT) {
|
||||
return ObdCode::None;
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ void SensorChecker::onSlowCallback() {
|
|||
#if BOARD_EXT_GPIOCHIPS > 0 && EFI_PROD_CODE
|
||||
// Check injectors
|
||||
#if EFI_ENGINE_CONTROL
|
||||
bool withInjectorIssues = false;
|
||||
int unhappyInjector = 0;
|
||||
for (size_t i = 0; i < efi::size(enginePins.injectors); i++) {
|
||||
InjectorOutputPin& pin = enginePins.injectors[i];
|
||||
|
||||
|
@ -191,7 +191,7 @@ void SensorChecker::onSlowCallback() {
|
|||
|
||||
auto diag = pin.getDiag();
|
||||
if (diag != PIN_OK && diag != PIN_INVALID) {
|
||||
withInjectorIssues = true;
|
||||
unhappyInjector = 1 + i;
|
||||
auto code = getCodeForInjector(i, diag);
|
||||
|
||||
char description[32];
|
||||
|
@ -199,7 +199,8 @@ void SensorChecker::onSlowCallback() {
|
|||
warning(code, "Injector %d fault: %s", i + 1, description);
|
||||
}
|
||||
}
|
||||
engine->fuelComputer.injectorHwIssue = withInjectorIssues;
|
||||
engine->fuelComputer.brokenInjector = unhappyInjector;
|
||||
engine->fuelComputer.injectorHwIssue = (unhappyInjector != 0);
|
||||
#endif // EFI_ENGINE_CONTROL
|
||||
|
||||
// Check ignition
|
||||
|
|
Loading…
Reference in New Issue