rename triggerSimulatorFrequency -> triggerSimulatorRpm
This commit is contained in:
parent
08081c2f98
commit
d1246174d2
|
@ -171,7 +171,7 @@ void setFrankensoConfiguration() {
|
|||
void setFrankensoBoardTestConfiguration() {
|
||||
setFrankensoConfiguration();
|
||||
|
||||
engineConfiguration->triggerSimulatorFrequency = 300;
|
||||
engineConfiguration->triggerSimulatorRpm = 300;
|
||||
engineConfiguration->cranking.rpm = 100;
|
||||
|
||||
engineConfiguration->cylindersCount = 12;
|
||||
|
@ -251,7 +251,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;
|
||||
|
@ -439,7 +439,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
|
||||
|
@ -586,7 +586,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;
|
||||
|
|
|
@ -604,10 +604,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;
|
||||
|
||||
|
|
|
@ -751,7 +751,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]));
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
cyclic_buffer<int> triggerErrorDetection;
|
||||
|
||||
/**
|
||||
* See also triggerSimulatorFrequency
|
||||
* See also triggerSimulatorRpm
|
||||
*/
|
||||
bool directSelfStimulation = false;
|
||||
|
||||
|
|
|
@ -83,7 +83,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
|
||||
|
@ -145,7 +145,7 @@ static void startSimulatedTriggerSignal() {
|
|||
}
|
||||
|
||||
TriggerWaveform *s = &engine->triggerCentral.triggerShape;
|
||||
setTriggerEmulatorRPM(engineConfiguration->triggerSimulatorFrequency);
|
||||
setTriggerEmulatorRPM(engineConfiguration->triggerSimulatorRpm);
|
||||
triggerSignal.weComplexInit("position sensor",
|
||||
&engine->executor,
|
||||
&s->wave,
|
||||
|
@ -179,11 +179,11 @@ void initTriggerEmulatorLogic() {
|
|||
}
|
||||
|
||||
void onConfigurationChangeRpmEmulatorCallback(engine_configuration_s *previousConfiguration) {
|
||||
if (engineConfiguration->triggerSimulatorFrequency ==
|
||||
previousConfiguration->triggerSimulatorFrequency) {
|
||||
if (engineConfiguration->triggerSimulatorRpm ==
|
||||
previousConfiguration->triggerSimulatorRpm) {
|
||||
return;
|
||||
}
|
||||
setTriggerEmulatorRPM(engineConfiguration->triggerSimulatorFrequency);
|
||||
setTriggerEmulatorRPM(engineConfiguration->triggerSimulatorRpm);
|
||||
}
|
||||
|
||||
void initTriggerEmulator() {
|
||||
|
|
|
@ -92,7 +92,7 @@
|
|||
! Any time an incompatible change is made to the configuration format stored in flash,
|
||||
! update this string to the current date! It is required to also update TS_SIGNATURE above
|
||||
! when this happens.
|
||||
#define FLASH_DATA_VERSION 20003
|
||||
#define FLASH_DATA_VERSION 20004
|
||||
|
||||
! this offset is part of console compatibility mechanism, please DO NOT change this offset
|
||||
#define TS_FILE_VERSION_OFFSET 124
|
||||
|
@ -461,6 +461,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
|
||||
|
@ -615,9 +617,6 @@ engineSyncCam_e engineSyncCam;Select which cam is used for engine sync. Other ca
|
|||
|
||||
output_pin_e o2heaterPin;On-off O2 sensor heater control. 'ON' if engine is running, 'OFF' if stopped or cranking.
|
||||
|
||||
! todo: rename to triggerSimulatorRpm
|
||||
int triggerSimulatorFrequency;Same RPM is used for two ways of producing simulated RPM.;"Rpm", 1, 0, 0, 30000, 0
|
||||
|
||||
output_pin_e[MAX_CYLINDER_COUNT iterate] injectionPins;
|
||||
output_pin_e[MAX_CYLINDER_COUNT iterate] ignitionPins;
|
||||
|
||||
|
|
|
@ -4064,7 +4064,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