ETB target is using integer values #945
first we will write a unit test
This commit is contained in:
parent
e29318b939
commit
9b98446846
|
@ -578,10 +578,6 @@ void initElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
|
|
||||||
startETBPins(PASS_ENGINE_PARAMETER_SIGNATURE);
|
startETBPins(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
||||||
// manual duty cycle control without PID. Percent value from 0 to 100
|
|
||||||
addConsoleActionNANF(CMD_ETB_DUTY, setThrottleDutyCycle);
|
|
||||||
|
|
||||||
|
|
||||||
tuneWorkingPidSettings.pFactor = 1;
|
tuneWorkingPidSettings.pFactor = 1;
|
||||||
tuneWorkingPidSettings.iFactor = 0;
|
tuneWorkingPidSettings.iFactor = 0;
|
||||||
tuneWorkingPidSettings.dFactor = 0;
|
tuneWorkingPidSettings.dFactor = 0;
|
||||||
|
@ -592,6 +588,8 @@ void initElectronicThrottle(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
|
||||||
tuneWorkingPidSettings.periodMs = 100;
|
tuneWorkingPidSettings.periodMs = 100;
|
||||||
|
|
||||||
#if EFI_PROD_CODE
|
#if EFI_PROD_CODE
|
||||||
|
// manual duty cycle control without PID. Percent value from 0 to 100
|
||||||
|
addConsoleActionNANF(CMD_ETB_DUTY, setThrottleDutyCycle);
|
||||||
// this is useful once you do "enable etb_auto"
|
// this is useful once you do "enable etb_auto"
|
||||||
addConsoleActionF("set_etbat_output", setTempOutput);
|
addConsoleActionF("set_etbat_output", setTempOutput);
|
||||||
addConsoleActionF("set_etbat_step", setAutoStep);
|
addConsoleActionF("set_etbat_step", setAutoStep);
|
||||||
|
|
|
@ -109,6 +109,11 @@ void mostCommonInitEngineController(Logging *sharedLogger DECLARE_ENGINE_PARAMET
|
||||||
#if EFI_IDLE_CONTROL
|
#if EFI_IDLE_CONTROL
|
||||||
startIdleThread(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
|
startIdleThread(sharedLogger PASS_ENGINE_PARAMETER_SUFFIX);
|
||||||
#endif /* EFI_IDLE_CONTROL */
|
#endif /* EFI_IDLE_CONTROL */
|
||||||
|
|
||||||
|
#if EFI_ELECTRONIC_THROTTLE_BODY
|
||||||
|
initElectronicThrottle(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
#endif /* EFI_ELECTRONIC_THROTTLE_BODY */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
@ -760,10 +765,6 @@ void initEngineContoller(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX)
|
||||||
initAuxPid(sharedLogger);
|
initAuxPid(sharedLogger);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if EFI_ELECTRONIC_THROTTLE_BODY
|
|
||||||
initElectronicThrottle();
|
|
||||||
#endif /* EFI_ELECTRONIC_THROTTLE_BODY */
|
|
||||||
|
|
||||||
#if EFI_MALFUNCTION_INDICATOR
|
#if EFI_MALFUNCTION_INDICATOR
|
||||||
initMalfunctionIndicator();
|
initMalfunctionIndicator();
|
||||||
#endif /* EFI_MALFUNCTION_INDICATOR */
|
#endif /* EFI_MALFUNCTION_INDICATOR */
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
|
|
||||||
#define EFI_IDLE_CONTROL TRUE
|
#define EFI_IDLE_CONTROL TRUE
|
||||||
|
|
||||||
|
#define EFI_ELECTRONIC_THROTTLE_BODY TRUE
|
||||||
|
|
||||||
#define SPARK_EXTREME_LOGGING TRUE
|
#define SPARK_EXTREME_LOGGING TRUE
|
||||||
|
|
||||||
#define EFI_ENABLE_MOCK_ADC FALSE
|
#define EFI_ENABLE_MOCK_ADC FALSE
|
||||||
|
|
|
@ -182,3 +182,11 @@ TEST(idle, timingPid) {
|
||||||
ASSERT_FLOAT_EQ(-5.0f, corr) << "getAdvanceCorrections#7";
|
ASSERT_FLOAT_EQ(-5.0f, corr) << "getAdvanceCorrections#7";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TEST(idle, testTargetTpsIsFloatBug945) {
|
||||||
|
|
||||||
|
WITH_ENGINE_TEST_HELPER(TEST_ENGINE);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue