parent
4561b08ed8
commit
1bad5f3047
|
@ -196,8 +196,6 @@ void setFrankensoConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
void setFrankensoBoardTestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
setFrankensoConfiguration(PASS_CONFIG_PARAMETER_SIGNATURE);
|
||||
|
||||
engineConfiguration->directSelfStimulation = true; // this engine type is used for board validation
|
||||
|
||||
engineConfiguration->triggerSimulatorFrequency = 300;
|
||||
engineConfiguration->cranking.rpm = 100;
|
||||
|
||||
|
@ -313,8 +311,6 @@ void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
||||
engineConfiguration->crankingInjectionMode = IM_SEQUENTIAL;
|
||||
|
||||
engineConfiguration->directSelfStimulation = true;
|
||||
|
||||
#if defined(STM32_HAS_GPIOG) && STM32_HAS_GPIOG
|
||||
engineConfiguration->ignitionPins[0] = GPIOG_3;
|
||||
engineConfiguration->ignitionPins[1] = GPIOG_4;
|
||||
|
@ -403,8 +399,6 @@ void setTle8888TestConfiguration(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
|||
*/
|
||||
void mreBoardTest(DECLARE_CONFIG_PARAMETER_SIGNATURE) {
|
||||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
engineConfiguration->directSelfStimulation = true; // this engine type is used for board validation
|
||||
|
||||
engineConfiguration->debugMode = DBG_TLE8888;
|
||||
|
||||
engineConfiguration->triggerSimulatorFrequency = 60;
|
||||
|
|
|
@ -260,6 +260,8 @@ public:
|
|||
*/
|
||||
bool isTestMode = false;
|
||||
|
||||
bool directSelfStimulation = false;
|
||||
|
||||
void resetEngineSnifferIfInTestMode();
|
||||
|
||||
/**
|
||||
|
|
|
@ -921,7 +921,6 @@ static void setDefaultEngineConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
engineConfiguration->mapHighValueVoltage = 5;
|
||||
|
||||
engineConfiguration->logFormat = LF_NATIVE;
|
||||
engineConfiguration->directSelfStimulation = false;
|
||||
|
||||
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_60_2;
|
||||
|
||||
|
@ -1114,9 +1113,6 @@ void resetConfigurationExt(Logging * logger, configuration_callback_t boardCallb
|
|||
setBoardConfigurationOverrides();
|
||||
#endif
|
||||
|
||||
#if EFI_SIMULATOR
|
||||
engineConfiguration->directSelfStimulation = true;
|
||||
#endif /* */
|
||||
engineConfiguration->engineType = engineType;
|
||||
|
||||
/**
|
||||
|
|
|
@ -261,6 +261,9 @@ static void handleCommandX14(uint16_t index) {
|
|||
case 0xC:
|
||||
engine->etbAutoTune = true;
|
||||
return;
|
||||
case 0xD:
|
||||
engine->directSelfStimulation = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -272,7 +272,7 @@ static void doPeriodicSlowCallback(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
|||
engine->rpmCalculator.setStopSpinning(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
}
|
||||
|
||||
if (CONFIG(directSelfStimulation) || engine->rpmCalculator.isStopped(PASS_ENGINE_PARAMETER_SIGNATURE)) {
|
||||
if (ENGINE(directSelfStimulation) || engine->rpmCalculator.isStopped(PASS_ENGINE_PARAMETER_SIGNATURE)) {
|
||||
/**
|
||||
* rusEfi usually runs on hardware which halts execution while writing to internal flash, so we
|
||||
* postpone writes to until engine is stopped. Writes in case of self-stimulation are fine.
|
||||
|
|
|
@ -972,7 +972,7 @@ static void enableOrDisable(const char *param, bool isEnabled) {
|
|||
} else if (strEqualCaseInsensitive(param, "ignition")) {
|
||||
engineConfiguration->isIgnitionEnabled = isEnabled;
|
||||
} else if (strEqualCaseInsensitive(param, "self_stimulation")) {
|
||||
engineConfiguration->directSelfStimulation = isEnabled;
|
||||
engine->directSelfStimulation = isEnabled;
|
||||
} else if (strEqualCaseInsensitive(param, "engine_control")) {
|
||||
engineConfiguration->isEngineControlEnabled = isEnabled;
|
||||
} else if (strEqualCaseInsensitive(param, "map_avg")) {
|
||||
|
|
|
@ -605,7 +605,7 @@ void triggerInfo(void) {
|
|||
boolToString(ts->isSynchronizationNeeded),
|
||||
boolToString(isTriggerDecoderError()), engine->triggerCentral.triggerState.totalTriggerErrorCounter,
|
||||
engine->triggerCentral.triggerState.orderingErrorCounter, engine->triggerCentral.triggerState.getTotalRevolutionCounter(),
|
||||
boolToString(engineConfiguration->directSelfStimulation));
|
||||
boolToString(engine->directSelfStimulation));
|
||||
|
||||
if (TRIGGER_WAVEFORM(isSynchronizationNeeded)) {
|
||||
scheduleMsg(logger, "gap from %.2f to %.2f", TRIGGER_WAVEFORM(syncronizationRatioFrom[0]), TRIGGER_WAVEFORM(syncronizationRatioTo[0]));
|
||||
|
|
|
@ -139,15 +139,18 @@ static void emulatorApplyPinState(int stateIndex, PwmConfig *state) /* pwm_gen_c
|
|||
if (!isEmulating) {
|
||||
return;
|
||||
}
|
||||
#if EFI_PROD_CODE
|
||||
applyPinState(stateIndex, state);
|
||||
#endif /* EFI_PROD_CODE */
|
||||
if (engineConfiguration->directSelfStimulation) {
|
||||
|
||||
if (engine->directSelfStimulation) {
|
||||
/**
|
||||
* this callback would invoke the input signal handlers directly
|
||||
*/
|
||||
helper.handleEmulatorCallback(state, stateIndex);
|
||||
}
|
||||
|
||||
#if EFI_PROD_CODE
|
||||
applyPinState(stateIndex, state);
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
||||
}
|
||||
|
||||
static void setEmulatorAtIndex(int index) {
|
||||
|
|
|
@ -354,7 +354,7 @@ end_struct
|
|||
injector_s injector
|
||||
|
||||
|
||||
bit directSelfStimulation;+Should trigger emulator push data right into trigger handling logic, eliminating the need for physical jumper wires?\nSee also triggerSimulatorPins\nPS: Funny name, right? :)
|
||||
bit unused76b0;
|
||||
bit activateAuxPid1;
|
||||
bit isVerboseAuxPid1;
|
||||
bit activateAuxPid2;
|
||||
|
|
|
@ -1458,6 +1458,7 @@ cmd_test_ac_relay = "w\x00\x14\x00\x09"
|
|||
cmd_write_config = "w\x00\x14\x00\x0A"
|
||||
cmd_test_starter_relay = "w\x00\x14\x00\x0B"
|
||||
cmd_etb_autotune = "w\x00\x14\x00\x0C"
|
||||
cmd_enable_self_stim = "w\x00\x14\x00\x0D"
|
||||
|
||||
cmd_test_radiator_fan = "w\x00\x15\x00\x01"
|
||||
cmd_test_check_engine_light = "w\x00\x16\x00\x01"
|
||||
|
@ -2832,7 +2833,7 @@ cmd_set_engine_type_default = "w\x00\x31\x00\x00"
|
|||
; Board->ECU stimulator
|
||||
dialog = ecuStimulator, "ECU stimulator"
|
||||
field = "Trigger Simulator", triggerSimulatorFrequency
|
||||
field = "self-stimulation", directSelfStimulation
|
||||
commandButton = "Enable Internal Trigger Simulation", cmd_enable_self_stim
|
||||
field = ""
|
||||
field = "digipot spi", digitalPotentiometerSpiDevice
|
||||
field = "digipot CS #0", digitalPotentiometerChipSelect1
|
||||
|
|
Loading…
Reference in New Issue