Clean-up analog channels in "unit" tests #1456
This commit is contained in:
parent
f2cf1358c1
commit
3ffc51f495
|
@ -8,17 +8,9 @@
|
|||
#include "boards.h"
|
||||
#include "engine.h"
|
||||
|
||||
// todo: migrate to engine->engineState.mockAdcState
|
||||
float testMafValue = 0;
|
||||
|
||||
// see setMockVoltage
|
||||
float getVoltageDivided(const char *msg, adc_channel_e hwChannel DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
switch(hwChannel) {
|
||||
case TEST_MAF_CHANNEL:
|
||||
return testMafValue;
|
||||
default:
|
||||
return adcToVolts(engine->engineState.mockAdcState.getMockAdcValue(hwChannel));;
|
||||
}
|
||||
return adcToVolts(engine->engineState.mockAdcState.getMockAdcValue(hwChannel));;
|
||||
}
|
||||
|
||||
float getVoltage(const char *msg, adc_channel_e hwChannel DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
||||
|
|
|
@ -57,7 +57,8 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType, configuration_callb
|
|||
|
||||
commonInitEngineController(NULL PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
engine->engineConfigurationPtr->mafAdcChannel = TEST_MAF_CHANNEL;
|
||||
engineConfiguration->mafAdcChannel = EFI_ADC_10;
|
||||
engine->engineState.mockAdcState.setMockVoltage(EFI_ADC_10, 0 PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
|
||||
Sensor::setMockValue(SensorType::Clt, 70);
|
||||
Sensor::setMockValue(SensorType::Iat, 30);
|
||||
|
|
Loading…
Reference in New Issue