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