mirror of https://github.com/rusefi/rusefi-1.git
28 lines
658 B
C++
28 lines
658 B
C++
/**
|
|
* @file board.cpp
|
|
*
|
|
* @date Nov 15, 2013
|
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
|
*/
|
|
|
|
#include "pch.h"
|
|
|
|
#include "boards.h"
|
|
|
|
// see setMockVoltage
|
|
float getVoltageDivided(const char *msg, adc_channel_e hwChannel) {
|
|
return adcToVolts(engine->engineState.mockAdcState.getMockAdcValue(hwChannel));;
|
|
}
|
|
|
|
float getVoltage(const char *msg, adc_channel_e hwChannel) {
|
|
if (engine->engineState.mockAdcState.hasMockAdc[hwChannel])
|
|
return adcToVolts(engine->engineState.mockAdcState.getMockAdcValue(hwChannel) * engineConfiguration->analogInputDividerCoefficient);
|
|
return 0;
|
|
}
|
|
|
|
int getAdcValue(const char *msg, adc_channel_e hwChannel) {
|
|
return 0;
|
|
}
|
|
|
|
|