progress: bringing simulator closer to real code
only:hellen-honda-k
This commit is contained in:
parent
9cf426e3db
commit
24e3aa5cc7
|
@ -32,6 +32,7 @@
|
|||
#include "main_trigger_callback.h"
|
||||
#include "flash_main.h"
|
||||
#include "bench_test.h"
|
||||
#include "mmc_card.h"
|
||||
#include "electronic_throttle.h"
|
||||
#include "map_averaging.h"
|
||||
#include "high_pressure_fuel_pump.h"
|
||||
|
@ -618,6 +619,10 @@ void commonEarlyInit() {
|
|||
* Initialize hardware drivers
|
||||
*/
|
||||
initHardware();
|
||||
|
||||
#if EFI_FILE_LOGGING
|
||||
initMmcCard();
|
||||
#endif /* EFI_FILE_LOGGING */
|
||||
}
|
||||
|
||||
void initEngineController() {
|
||||
|
|
|
@ -253,10 +253,13 @@ void runRusEfiWithConfig() {
|
|||
|
||||
commonEarlyInit();
|
||||
|
||||
#if EFI_ENGINE_EMULATOR
|
||||
initEngineEmulator();
|
||||
#endif
|
||||
|
||||
#if EFI_FILE_LOGGING
|
||||
initMmcCard();
|
||||
#endif /* EFI_FILE_LOGGING */
|
||||
#if EFI_LUA
|
||||
startLua();
|
||||
#endif // EFI_LUA
|
||||
|
||||
#if EFI_CAN_SERIAL
|
||||
// needs to be called after initCan() inside initHardware()
|
||||
|
@ -269,9 +272,6 @@ void runRusEfiWithConfig() {
|
|||
enableTriggerStimulator();
|
||||
#endif // HW_CHECK_ALWAYS_STIMULATE
|
||||
|
||||
#if EFI_LUA
|
||||
startLua();
|
||||
#endif // EFI_LUA
|
||||
|
||||
// Config could be completely bogus - don't start anything else!
|
||||
if (validateConfig()) {
|
||||
|
@ -282,9 +282,6 @@ void runRusEfiWithConfig() {
|
|||
*/
|
||||
initEngineController();
|
||||
|
||||
#if EFI_ENGINE_EMULATOR
|
||||
initEngineEmulator();
|
||||
#endif
|
||||
|
||||
// This has to happen after RegisteredOutputPins are init'd: otherwise no change will be detected, and no init will happen
|
||||
rememberCurrentConfiguration();
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include "bench_test.h"
|
||||
#include "tunerstudio.h"
|
||||
#include "map_averaging.h"
|
||||
#include "mmc_card.h"
|
||||
#include "memstreams.h"
|
||||
#include <chprintf.h>
|
||||
#include "rusefi_lua.h"
|
||||
|
@ -95,6 +94,9 @@ void rusEfiFunctionalTest(void) {
|
|||
|
||||
engine->setConfig();
|
||||
|
||||
startLoggingProcessor();
|
||||
|
||||
|
||||
initializeConsole();
|
||||
|
||||
initStatusLoop();
|
||||
|
@ -115,9 +117,8 @@ void rusEfiFunctionalTest(void) {
|
|||
|
||||
commonEarlyInit();
|
||||
|
||||
startLoggingProcessor();
|
||||
startLua();
|
||||
|
||||
initMmcCard();
|
||||
|
||||
/**
|
||||
* !!!! TESTS !
|
||||
|
@ -128,8 +129,6 @@ void rusEfiFunctionalTest(void) {
|
|||
* end of TESTS !
|
||||
*/
|
||||
|
||||
initPeriodicEvents();
|
||||
|
||||
setTriggerEmulatorRPM(DEFAULT_SIM_RPM);
|
||||
engineConfiguration->engineSnifferRpmThreshold = DEFAULT_SNIFFER_THR;
|
||||
|
||||
|
@ -144,7 +143,8 @@ void rusEfiFunctionalTest(void) {
|
|||
initCan();
|
||||
#endif // HAL_USE_CAN
|
||||
|
||||
startLua();
|
||||
|
||||
initPeriodicEvents();
|
||||
|
||||
extern bool main_loop_started;
|
||||
main_loop_started = true;
|
||||
|
|
Loading…
Reference in New Issue