rename triggerSimulatorFrequency -> triggerSimulatorRpm
(cherry picked from commit d1246174d283ae775444a0e183be9cace88219a9)
This commit is contained in:
parent
b133aae52e
commit
71a032a61b
|
@ -172,7 +172,7 @@ void setFrankensoConfiguration() {
|
|||
void setFrankensoBoardTestConfiguration() {
|
||||
setFrankensoConfiguration();
|
||||
|
||||
engineConfiguration->triggerSimulatorFrequency = 300;
|
||||
engineConfiguration->triggerSimulatorRpm = 300;
|
||||
engineConfiguration->cranking.rpm = 100;
|
||||
|
||||
engineConfiguration->cylindersCount = 12;
|
||||
|
@ -252,7 +252,7 @@ void setEtbTestConfiguration() {
|
|||
engineConfiguration->throttlePedalPositionAdcChannel = EFI_ADC_9; // PB1
|
||||
|
||||
// turning off other PWMs to simplify debugging
|
||||
engineConfiguration->triggerSimulatorFrequency = 0;
|
||||
engineConfiguration->triggerSimulatorRpm = 0;
|
||||
engineConfiguration->stepperEnablePin = Gpio::Unassigned;
|
||||
engineConfiguration->idle.stepperStepPin = Gpio::Unassigned;
|
||||
engineConfiguration->idle.stepperDirectionPin = Gpio::Unassigned;
|
||||
|
@ -441,7 +441,7 @@ static void mreBoardOldTest() {
|
|||
#if (BOARD_TLE8888_COUNT > 0)
|
||||
engineConfiguration->debugMode = DBG_TLE8888;
|
||||
|
||||
engineConfiguration->triggerSimulatorFrequency = 202;
|
||||
engineConfiguration->triggerSimulatorRpm = 202;
|
||||
// set cranking_rpm 500
|
||||
engineConfiguration->cranking.rpm = 100;
|
||||
// set cranking_dwell 200
|
||||
|
@ -588,7 +588,7 @@ end
|
|||
void proteusBoardTest() {
|
||||
engineConfiguration->cylindersCount = 12;
|
||||
engineConfiguration->firingOrder = FO_1_2_3_4_5_6_7_8_9_10_11_12;
|
||||
engineConfiguration->triggerSimulatorFrequency = 600;
|
||||
engineConfiguration->triggerSimulatorRpm = 600;
|
||||
engineConfiguration->injector.flow = 4.6; // longer blink
|
||||
|
||||
engineConfiguration->cranking.rpm = 100;
|
||||
|
|
|
@ -616,10 +616,7 @@ static void setDefaultEngineConfiguration() {
|
|||
engineConfiguration->knockDetectionWindowStart = 15.0 + 5.0;
|
||||
engineConfiguration->knockDetectionWindowEnd = 15.0 + 45.0;
|
||||
|
||||
/**
|
||||
* this is RPM. 10000 rpm is only 166Hz, 800 rpm is 13Hz
|
||||
*/
|
||||
engineConfiguration->triggerSimulatorFrequency = 1200;
|
||||
engineConfiguration->triggerSimulatorRpm = 1200;
|
||||
|
||||
engineConfiguration->alternatorPwmFrequency = 300;
|
||||
|
||||
|
|
|
@ -924,7 +924,7 @@ void triggerInfo(void) {
|
|||
efiPrintf("primary trigger simulator: %s %s freq=%d",
|
||||
hwPortname(engineConfiguration->triggerSimulatorPins[0]),
|
||||
getPin_output_mode_e(engineConfiguration->triggerSimulatorPinModes[0]),
|
||||
engineConfiguration->triggerSimulatorFrequency);
|
||||
engineConfiguration->triggerSimulatorRpm);
|
||||
|
||||
if (ts->needSecondTriggerInput) {
|
||||
efiPrintf("secondary trigger input: %s", hwPortname(engineConfiguration->triggerInputPins[1]));
|
||||
|
|
|
@ -76,7 +76,7 @@ public:
|
|||
cyclic_buffer<int> triggerErrorDetection;
|
||||
|
||||
/**
|
||||
* See also triggerSimulatorFrequency
|
||||
* See also triggerSimulatorRpm
|
||||
*/
|
||||
bool directSelfStimulation = false;
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ static float getRpmMultiplier(operation_mode_e mode) {
|
|||
}
|
||||
|
||||
void setTriggerEmulatorRPM(int rpm) {
|
||||
engineConfiguration->triggerSimulatorFrequency = rpm;
|
||||
engineConfiguration->triggerSimulatorRpm = rpm;
|
||||
/**
|
||||
* All we need to do here is to change the periodMs
|
||||
* togglePwmState() would see that the periodMs has changed and act accordingly
|
||||
|
@ -161,7 +161,7 @@ static void startSimulatedTriggerSignal() {
|
|||
}
|
||||
|
||||
TriggerWaveform *s = getTriggerForEmulation();
|
||||
setTriggerEmulatorRPM(engineConfiguration->triggerSimulatorFrequency);
|
||||
setTriggerEmulatorRPM(engineConfiguration->triggerSimulatorRpm);
|
||||
triggerEmulatorSignal.weComplexInit("position sensor",
|
||||
&engine->executor,
|
||||
&s->wave,
|
||||
|
@ -197,11 +197,11 @@ void disableTriggerStimulator() {
|
|||
}
|
||||
|
||||
void onConfigurationChangeRpmEmulatorCallback(engine_configuration_s *previousConfiguration) {
|
||||
if (engineConfiguration->triggerSimulatorFrequency ==
|
||||
previousConfiguration->triggerSimulatorFrequency) {
|
||||
if (engineConfiguration->triggerSimulatorRpm ==
|
||||
previousConfiguration->triggerSimulatorRpm) {
|
||||
return;
|
||||
}
|
||||
setTriggerEmulatorRPM(engineConfiguration->triggerSimulatorFrequency);
|
||||
setTriggerEmulatorRPM(engineConfiguration->triggerSimulatorRpm);
|
||||
}
|
||||
|
||||
static void hackVvtSimulation() {
|
||||
|
|
|
@ -473,6 +473,8 @@ ThermistorConf iat;
|
|||
|
||||
uint16_t autoscale displacement;Engine displacement in litres;"L", 0.001, 0, 0, 65, 3
|
||||
|
||||
uint16_t triggerSimulatorRpm;;"RPM", 1, 0, 0, 30000, 0
|
||||
|
||||
uint32_t cylindersCount;Number of cylinder the engine has.;"", 1, 0, 1, @@MAX_CYLINDER_COUNT@@, 0
|
||||
|
||||
! see firing_order.h
|
||||
|
@ -626,9 +628,6 @@ engineSyncCam_e engineSyncCam;Select which cam is used for engine sync. Other ca
|
|||
Gpio l9779_cs;
|
||||
|
||||
|
||||
! todo: rename to triggerSimulatorRpm
|
||||
int triggerSimulatorFrequency;Same RPM is used for two ways of producing simulated RPM. See also triggerSimulatorPins (with wires)\nSee also directSelfStimulation (no wires, bypassing input hardware)\nrpm X\nTODO: rename to triggerSimulatorRpm;"Rpm", 1, 0, 0, 30000, 0
|
||||
|
||||
output_pin_e[MAX_CYLINDER_COUNT iterate] injectionPins;
|
||||
output_pin_e[MAX_CYLINDER_COUNT iterate] ignitionPins;
|
||||
|
||||
|
|
|
@ -4167,7 +4167,7 @@ dialog = tcuControls, "Transmission Settings"
|
|||
|
||||
; Board->ECU stimulator
|
||||
dialog = ecuStimulator, "ECU stimulator"
|
||||
field = "Trigger Simulator", triggerSimulatorFrequency
|
||||
field = "Trigger Simulator", triggerSimulatorRpm
|
||||
commandButton = "Enable internal trigger simulation", cmd_enable_self_stim
|
||||
commandButton = "Enable external trigger simulation", cmd_enable_ext_stim @@if_ts_show_hardware_simulator
|
||||
commandButton = "Disable trigger simulation", cmd_disable_self_stim
|
||||
|
|
Loading…
Reference in New Issue