EFI_IDLE_INCREMENTAL_PID_CIC should be a runtime parameter #806
This commit is contained in:
parent
177c5a235b
commit
13aef2dd77
|
@ -114,11 +114,11 @@ Pid * getIdlePid() {
|
|||
return &idlePid;
|
||||
}
|
||||
|
||||
float getIdlePidOffset() {
|
||||
float getIdlePidOffset(DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
return getIdlePid()->getOffset();
|
||||
}
|
||||
|
||||
float getIdlePidMinValue() {
|
||||
float getIdlePidMinValue(DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
return getIdlePid()->getMinValue();
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,6 @@ void stopIdleHardware(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
|||
void initIdleHardware(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
bool isIdleHardwareRestartNeeded();
|
||||
void onConfigurationChangeIdleCallback(engine_configuration_s *previousConfiguration);
|
||||
float getIdlePidOffset();
|
||||
float getIdlePidOffset(DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
Pid * getIdlePid();
|
||||
float getIdlePidMinValue();
|
||||
float getIdlePidMinValue(DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
|
|
|
@ -43,15 +43,15 @@ TEST(idle, fsioPidParameters) {
|
|||
ASSERT_EQ(1, getAcToggle(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||
|
||||
eth.engine.periodicSlowCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
ASSERT_EQ(40, getIdlePidOffset());
|
||||
ASSERT_EQ(30, getIdlePidMinValue());
|
||||
ASSERT_EQ(40, getIdlePidOffset(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||
ASSERT_EQ(30, getIdlePidMinValue(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||
|
||||
setMockVoltage(engineConfiguration->acSwitchAdc, 5 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
ASSERT_EQ(0, getAcToggle(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||
|
||||
eth.engine.periodicSlowCallback(PASS_ENGINE_PARAMETER_SIGNATURE);
|
||||
ASSERT_EQ(50, getIdlePidOffset());
|
||||
ASSERT_EQ(60, getIdlePidMinValue());
|
||||
ASSERT_EQ(50, getIdlePidOffset(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||
ASSERT_EQ(60, getIdlePidMinValue(PASS_ENGINE_PARAMETER_SIGNATURE));
|
||||
|
||||
|
||||
// todo finish this unit test!
|
||||
|
|
Loading…
Reference in New Issue