rusefi/unit_tests/boards.cpp

28 lines
722 B
C++
Raw Normal View History

2015-07-10 06:01:56 -07:00
/**
2020-05-20 00:12:23 -07:00
* @file board.cpp
2015-07-10 06:01:56 -07:00
*
* @date Nov 15, 2013
2020-01-13 18:57:43 -08:00
* @author Andrey Belomutskiy, (c) 2012-2020
2015-07-10 06:01:56 -07:00
*/
#include "pch.h"
2015-07-10 06:01:56 -07:00
#include "boards.h"
// see setMockVoltage
float getVoltageDivided(const char *msg, adc_channel_e hwChannel DECLARE_ENGINE_PARAMETER_SUFFIX) {
return adcToVolts(engine->engineState.mockAdcState.getMockAdcValue(hwChannel));;
2015-07-10 06:01:56 -07:00
}
float getVoltage(const char *msg, adc_channel_e hwChannel DECLARE_ENGINE_PARAMETER_SUFFIX) {
if (engine->engineState.mockAdcState.hasMockAdc[hwChannel])
return adcToVolts(engine->engineState.mockAdcState.getMockAdcValue(hwChannel) * engineConfiguration->analogInputDividerCoefficient);
2015-07-10 06:01:56 -07:00
return 0;
}
int getAdcValue(const char *msg, adc_channel_e hwChannel) {
2015-07-10 06:01:56 -07:00
return 0;
}