rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
controllers
modules
configuration_wizard
strategies
vin_strategy.cpp
Go to the documentation of this file.
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
void
vinStrategy
(
bool
isRunningOnBurn) {
20
bool
isVinFilled =
static_cast<
bool
>
(strlen(
engineConfiguration
->
vinNumber
));
21
22
bool
vinStateChanged = isVinFilled ==
engineConfiguration
->
vinIsEmpty
;
23
24
if
(vinStateChanged && !isRunningOnBurn) {
25
efiPrintf(
"VinStrategy, reseting flag"
);
26
engineConfiguration
->
vinIsEmpty
= !isVinFilled;
27
28
if
(!isVinFilled) {
29
engineConfiguration
->
wizardPanelToShow
=
djb2lowerCase
(DIALOG_NAME_VEHICLE_INFORMATION);
30
}
else
{
31
engineConfiguration
->
wizardPanelToShow
= -1;
32
}
33
34
35
// trigger page reset, see [tag:popular_vehicle]
36
#if EFI_TUNER_STUDIO && !EFI_UNIT_TEST
37
onApplyPreset
();
38
#endif
// EFI_TUNER_STUDIO
39
}
40
41
}
djb2lowerCase
int djb2lowerCase(const char *str)
Definition
efilib.cpp:135
engineConfiguration
static constexpr engine_configuration_s * engineConfiguration
Definition
engine_configuration.h:81
pch.h
engine_configuration_s::vinIsEmpty
bool vinIsEmpty
Definition
engine_configuration_generated_structures_alphax-2chan.h:2714
engine_configuration_s::vinNumber
vin_number_t vinNumber
Definition
engine_configuration_generated_structures_alphax-2chan.h:4682
engine_configuration_s::wizardPanelToShow
int wizardPanelToShow
Definition
engine_configuration_generated_structures_alphax-2chan.h:1772
onApplyPreset
void onApplyPreset()
Definition
tunerstudio.cpp:268
tunerstudio.h
vinStrategy
void vinStrategy(bool isRunningOnBurn)
Definition
vin_strategy.cpp:19
Generated on Fri Dec 19 2025 00:10:28 for rusEFI by
1.9.8