accel enrich commands

This commit is contained in:
Matthew Kennedy 2024-07-03 01:14:03 -07:00
parent 78ea67371e
commit 06cbbca238
3 changed files with 7 additions and 30 deletions

View File

@ -195,29 +195,15 @@ TpsAccelEnrichment::TpsAccelEnrichment() {
#if ! EFI_UNIT_TEST #if ! EFI_UNIT_TEST
void setTpsAccelThr(float value) {
engineConfiguration->tpsAccelEnrichmentThreshold = value;
}
void setTpsDecelThr(float value) {
engineConfiguration->tpsDecelEnleanmentThreshold = value;
}
void setTpsDecelMult(float value) {
engineConfiguration->tpsDecelEnleanmentMultiplier = value;
}
void setTpsAccelLen(int length) {
if (length < 1) {
efiPrintf("Length should be positive");
return;
}
engine->tpsAccelEnrichment.setLength(length);
}
void updateAccelParameters() { void updateAccelParameters() {
constexpr float slowCallbackPeriodSecond = SLOW_CALLBACK_PERIOD_MS / 1000.0f; constexpr float slowCallbackPeriodSecond = SLOW_CALLBACK_PERIOD_MS / 1000.0f;
setTpsAccelLen(engineConfiguration->tpsAccelLookback / slowCallbackPeriodSecond); int length = engineConfiguration->tpsAccelLookback / slowCallbackPeriodSecond;
if (length < 1) {
length = 1;
}
engine->tpsAccelEnrichment.setLength(length);
} }
#endif /* ! EFI_UNIT_TEST */ #endif /* ! EFI_UNIT_TEST */

View File

@ -39,9 +39,4 @@ public:
void initAccelEnrichment(); void initAccelEnrichment();
void setTpsAccelThr(float value);
void setTpsDecelThr(float value);
void setTpsDecelMult(float value);
void setTpsAccelLen(int length);
void updateAccelParameters(); void updateAccelParameters();

View File

@ -378,9 +378,6 @@ const command_f_s commandsF[] = {
{"global_trigger_offset_angle", setGlobalTriggerAngleOffset}, {"global_trigger_offset_angle", setGlobalTriggerAngleOffset},
{"cranking_iac", setCrankingIACExtra}, {"cranking_iac", setCrankingIACExtra},
{"cranking_timing_angle", setCrankingTimingAngle}, {"cranking_timing_angle", setCrankingTimingAngle},
{"tps_accel_threshold", setTpsAccelThr},
{"tps_decel_threshold", setTpsDecelThr},
{"tps_decel_multiplier", setTpsDecelMult},
#endif // EFI_ENGINE_CONTROL #endif // EFI_ENGINE_CONTROL
#if EFI_ELECTRONIC_THROTTLE_BODY #if EFI_ELECTRONIC_THROTTLE_BODY
@ -402,7 +399,6 @@ const command_i_s commandsI[] = {{"ignition_mode", setIgnitionMode},
{"debug_mode", setDebugMode}, {"debug_mode", setDebugMode},
{"trigger_type", setTriggerType}, {"trigger_type", setTriggerType},
{"idle_solenoid_freq", setIdleSolenoidFrequency}, {"idle_solenoid_freq", setIdleSolenoidFrequency},
{"tps_accel_len", setTpsAccelLen},
#endif // EFI_ENGINE_CONTROL #endif // EFI_ENGINE_CONTROL
#if EFI_PROD_CODE #if EFI_PROD_CODE
#if EFI_CAN_SUPPORT #if EFI_CAN_SUPPORT