2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* @file engine_emulator.cpp
|
|
|
|
* @brief Entry point for all the emulation and analysis code
|
|
|
|
*
|
2019-04-14 10:21:03 -07:00
|
|
|
* there is a chance that 90% of the code here is dead
|
|
|
|
*
|
2015-07-10 06:01:56 -07:00
|
|
|
* @date Mar 15, 2013
|
2020-01-13 18:57:43 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
2021-08-03 19:05:01 -07:00
|
|
|
#include "pch.h"
|
2015-07-10 06:01:56 -07:00
|
|
|
#include "engine_emulator.h"
|
|
|
|
|
|
|
|
#include "poten.h"
|
2020-04-24 11:00:06 -07:00
|
|
|
#include "trigger_emulator_algo.h"
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2021-11-16 01:15:29 -08:00
|
|
|
void initEngineEmulator() {
|
2015-07-10 06:01:56 -07:00
|
|
|
if (hasFirmwareError())
|
|
|
|
return;
|
|
|
|
|
2019-04-14 10:21:03 -07:00
|
|
|
#if EFI_POTENTIOMETER && HAL_USE_SPI
|
2021-11-16 01:15:29 -08:00
|
|
|
initPotentiometers();
|
2019-04-14 10:21:03 -07:00
|
|
|
#endif /* EFI_POTENTIOMETER && HAL_USE_SPI*/
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2022-12-17 12:23:32 -08:00
|
|
|
#if EFI_EMULATE_POSITION_SENSORS
|
2021-11-16 01:15:29 -08:00
|
|
|
initTriggerEmulator();
|
2022-12-17 12:23:32 -08:00
|
|
|
#endif // EFI_EMULATE_POSITION_SENSORS
|
2015-07-10 06:01:56 -07:00
|
|
|
}
|