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 "boards.h"
|
2019-09-22 14:19:08 -07:00
|
|
|
#include "engine.h"
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2019-09-22 14:58:27 -07:00
|
|
|
// see setMockVoltage
|
2019-09-22 14:19:08 -07:00
|
|
|
float getVoltageDivided(const char *msg, adc_channel_e hwChannel DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
2020-05-20 00:54:40 -07:00
|
|
|
return adcToVolts(engine->engineState.mockAdcState.getMockAdcValue(hwChannel));;
|
2015-07-10 06:01:56 -07:00
|
|
|
}
|
|
|
|
|
2019-09-22 14:19:08 -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;
|
|
|
|
}
|
|
|
|
|
2019-09-22 14:19:08 -07:00
|
|
|
int getAdcValue(const char *msg, adc_channel_e hwChannel) {
|
2015-07-10 06:01:56 -07:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|