dead console command and minor refactoring

This commit is contained in:
Andrey 2022-08-31 22:41:58 -04:00
parent 61769e954f
commit a4805dace0
3 changed files with 2 additions and 27 deletions

View File

@ -548,10 +548,6 @@ void commonInitEngineController() {
#if (EFI_ENGINE_CONTROL && EFI_SHAFT_POSITION_INPUT) || EFI_SIMULATOR || EFI_UNIT_TEST
if (engineConfiguration->isEngineControlEnabled) {
initAuxValves();
/**
* This method adds trigger listener which actually schedules ignition
*/
initMainEventListener();
}
#endif /* EFI_ENGINE_CONTROL */

View File

@ -535,35 +535,16 @@ floatms_t PrimeController::getPrimeDuration() const {
}
void updatePrimeInjectionPulseState() {
#if EFI_PROD_CODE
static bool counterWasReset = false;
if (counterWasReset)
return;
if (!engine->rpmCalculator.isStopped()) {
#if EFI_PROD_CODE
backupRamSave(BACKUP_IGNITION_SWITCH_COUNTER, 0);
#endif /* EFI_PROD_CODE */
counterWasReset = true;
}
#endif /* EFI_PROD_CODE */
}
#if EFI_ENGINE_SNIFFER
#include "engine_sniffer.h"
#endif
static void showMainInfo(Engine *engine) {
#if EFI_PROD_CODE
int rpm = Sensor::getOrZero(SensorType::Rpm);
float el = getFuelingLoad();
efiPrintf("rpm %d engine_load %.2f", rpm, el);
efiPrintf("fuel %.2fms timing %.2f", engine->injectionDuration, engine->engineState.timingAdvance[0]);
#endif /* EFI_PROD_CODE */
}
void initMainEventListener() {
#if EFI_PROD_CODE
addConsoleActionP("maininfo", (VoidPtr) showMainInfo, engine);
#endif
}
#endif /* EFI_ENGINE_CONTROL */

View File

@ -11,8 +11,6 @@
#include "event_registry.h"
void initMainEventListener();
void mainTriggerCallback(uint32_t trgEventIndex, efitick_t edgeTimestamp, float currentPhase, float nextPhase);
bool noFiringUntilVvtSync(vvt_mode_e vvtMode);