unit tests progress

This commit is contained in:
rusefi 2019-09-20 00:25:43 -04:00
parent 3e9337f5d9
commit f2e67b05c0
2 changed files with 4 additions and 7 deletions

View File

@ -67,8 +67,8 @@ MockAdcState::MockAdcState() {
memset(hasMockAdc, 0, sizeof(hasMockAdc));
}
#if EFI_ENABLE_MOCK_ADC || EFI_SIMULATOR
void MockAdcState::setMockVoltage(int hwChannel, float voltage) {
#if EFI_ENABLE_MOCK_ADC
void MockAdcState::setMockVoltage(int hwChannel, float voltage DECLARE_ENGINE_PARAMETER_SUFFIX) {
scheduleMsg(&engineLogger, "fake voltage: channel %d value %.2f", hwChannel, voltage);
fakeAdcValues[hwChannel] = voltsToAdc(voltage);

View File

@ -5,8 +5,7 @@
* @author Andrey Belomutskiy, (c) 2012-2019
*/
#ifndef CONTROLLERS_ALGO_ENGINE_PARTS_H_
#define CONTROLLERS_ALGO_ENGINE_PARTS_H_
#pragma once
#include "global.h"
#include "engine_configuration_generated_structures.h"
@ -21,7 +20,7 @@ public:
bool hasMockAdc[MOCK_ADC_SIZE];
int fakeAdcValues[MOCK_ADC_SIZE];
void setMockVoltage(int hwChannel, float voltage);
void setMockVoltage(int hwChannel, float voltage DECLARE_ENGINE_PARAMETER_SUFFIX);
int getMockAdcValue(int hwChannel) const;
};
@ -190,5 +189,3 @@ public:
private:
void setPumpsCounter(int newValue);
};
#endif /* CONTROLLERS_ALGO_ENGINE_PARTS_H_ */