| Line | Branch | Decision | Exec | Source |
|---|---|---|---|---|
| 1 | /* | |||
| 2 | * @file vin_strategy.cpp | |||
| 3 | * | |||
| 4 | * @date: nov 11, 2025 | |||
| 5 | * @author FDSoftware | |||
| 6 | */ | |||
| 7 | #include <cstring> | |||
| 8 | ||||
| 9 | #include "pch.h" | |||
| 10 | #include "../configuration_wizard.h" | |||
| 11 | ||||
| 12 | #if EFI_TUNER_STUDIO | |||
| 13 | #include "tunerstudio.h" | |||
| 14 | #endif | |||
| 15 | ||||
| 16 | /* | |||
| 17 | * here we need to track if the wizard is active (vin is empty) and trigger TS page refresh | |||
| 18 | */ | |||
| 19 | 3 | void vinStrategy(bool isRunningOnBurn) { | ||
| 20 | ||||
| 21 |
2/2✓ Branch 0 taken 1 time.
✓ Branch 1 taken 2 times.
|
2/2✓ Decision 'true' taken 1 time.
✓ Decision 'false' taken 2 times.
|
3 | if (isRunningOnBurn) { |
| 22 | 1 | return; | ||
| 23 | } | |||
| 24 | ||||
| 25 | 2 | bool isVinFilled = static_cast<bool>(strlen(engineConfiguration->vinNumber)); | ||
| 26 | 2 | int vinWizard = djb2lowerCase(DIALOG_NAME_VEHICLE_INFORMATION); | ||
| 27 | ||||
| 28 | // the check with wizardPanelToShow is for not overriding an existing panel | |||
| 29 | // (i.e., we need to run more than one wizard with the current ecu configuration) | |||
| 30 |
3/4✓ Branch 0 taken 2 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 1 time.
✓ Branch 3 taken 1 time.
|
2/2✓ Decision 'true' taken 1 time.
✓ Decision 'false' taken 1 time.
|
2 | if (!isVinFilled && engineConfiguration->wizardPanelToShow == -1) { |
| 31 | 1 | efiPrintf("VinStrategy, reseting flag"); | ||
| 32 | 1 | engineConfiguration->wizardPanelToShow = vinWizard; | ||
| 33 |
1/4✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
✗ Branch 2 not taken.
✗ Branch 3 not taken.
|
1/2✗ Decision 'true' not taken.
✓ Decision 'false' taken 1 time.
|
1 | } else if (isVinFilled && engineConfiguration->wizardPanelToShow == vinWizard) { |
| 34 | ✗ | engineConfiguration->wizardPanelToShow = -1; | ||
| 35 | } | |||
| 36 | ||||
| 37 | ||||
| 38 | // trigger page reset, see [tag:popular_vehicle] | |||
| 39 | #if EFI_TUNER_STUDIO && !EFI_UNIT_TEST | |||
| 40 | onApplyPreset(); | |||
| 41 | #endif // EFI_TUNER_STUDIO | |||
| 42 | ||||
| 43 | } | |||
| 44 |