| 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 | 4 | void vinStrategy(bool isRunningOnBurn) { | ||
| 20 | 4 | bool isVinFilled = static_cast<bool>(strlen(engineConfiguration->vinNumber)); | ||
| 21 | ||||
| 22 | 4 | bool vinStateChanged = isVinFilled == engineConfiguration->vinIsEmpty; | ||
| 23 | ||||
| 24 |
3/4✓ Branch 0 taken 2 times.
✓ Branch 1 taken 2 times.
✓ Branch 2 taken 2 times.
✗ Branch 3 not taken.
|
2/2✓ Decision 'true' taken 2 times.
✓ Decision 'false' taken 2 times.
|
4 | if (vinStateChanged && !isRunningOnBurn) { |
| 25 | 2 | efiPrintf("VinStrategy, reseting flag"); | ||
| 26 | 2 | engineConfiguration->vinIsEmpty = !isVinFilled; | ||
| 27 | // trigger page reset, see [tag:popular_vehicle] | |||
| 28 | #if EFI_TUNER_STUDIO && !EFI_UNIT_TEST | |||
| 29 | onApplyPreset(); | |||
| 30 | #endif // EFI_TUNER_STUDIO | |||
| 31 | } | |||
| 32 | ||||
| 33 | 4 | } | ||
| 34 |