engine sniffer into unit tests
This commit is contained in:
parent
007764b212
commit
41804736e2
|
@ -127,6 +127,7 @@ void InjectorOutputPin::open(efitick_t nowNt DECLARE_ENGINE_PARAMETER_SUFFIX) {
|
|||
#if EFI_TOOTH_LOGGER
|
||||
LogTriggerInjectorState(nowNt, true PASS_ENGINE_PARAMETER_SUFFIX);
|
||||
#endif // EFI_TOOTH_LOGGER
|
||||
INJECT_ENGINE_REFERENCE(this);
|
||||
setHigh();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include "tooth_logger.h"
|
||||
|
||||
#include "hip9011.h"
|
||||
#include "engine_ptr.h"
|
||||
|
||||
#if EFI_ENGINE_CONTROL
|
||||
|
||||
|
@ -246,6 +247,7 @@ static void startDwellByTurningSparkPinHigh(IgnitionEvent *event, IgnitionOutput
|
|||
#if HW_CHECK_SPARK_FSIO
|
||||
enginePins.fsioOutputs[event->cylinderIndex].setValue(1);
|
||||
#endif // HW_CHECK_SPARK_FSIO
|
||||
INJECT_ENGINE_REFERENCE(output);
|
||||
output->setHigh();
|
||||
}
|
||||
|
||||
|
|
|
@ -91,6 +91,8 @@ private:
|
|||
*/
|
||||
class NamedOutputPin : public virtual OutputPin {
|
||||
public:
|
||||
DECLARE_ENGINE_PTR;
|
||||
|
||||
NamedOutputPin();
|
||||
explicit NamedOutputPin(const char *name);
|
||||
void setHigh();
|
||||
|
|
|
@ -143,6 +143,7 @@ CPPSRC = $(UTILSRC_CPP) \
|
|||
$(TRIGGER_SRC_CPP) \
|
||||
$(INIT_SRC_CPP) \
|
||||
$(PROJECT_DIR)/../unit_tests/logicdata.cpp \
|
||||
$(DEVELOPMENT_DIR)/engine_sniffer.cpp \
|
||||
$(PROJECT_DIR)/../unit_tests/main.cpp \
|
||||
$(PROJECT_DIR)/console/binary/tooth_logger.cpp \
|
||||
$(PROJECT_DIR)/console/binary_log/log_field.cpp \
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
#define EFI_ENABLE_ASSERTS TRUE
|
||||
|
||||
#define EFI_ENGINE_SNIFFER TRUE
|
||||
|
||||
#define EFI_PRINTF_FUEL_DETAILS TRUE
|
||||
|
||||
#define EFI_CJ125 TRUE
|
||||
|
|
|
@ -18,6 +18,12 @@
|
|||
#include "tooth_logger.h"
|
||||
#include "logicdata.h"
|
||||
|
||||
#if EFI_ENGINE_SNIFFER
|
||||
#include "engine_sniffer.h"
|
||||
extern WaveChart waveChart;
|
||||
#endif /* EFI_ENGINE_SNIFFER */
|
||||
|
||||
|
||||
extern int timeNowUs;
|
||||
extern WarningCodeState unitTestWarningCodeState;
|
||||
extern engine_configuration_s & activeConfiguration;
|
||||
|
@ -57,6 +63,9 @@ EngineTestHelper::EngineTestHelper(engine_type_e engineType, configuration_callb
|
|||
engine->setConfig(engine, &persistentConfig.engineConfiguration, &persistentConfig);
|
||||
EXPAND_Engine;
|
||||
|
||||
INJECT_ENGINE_REFERENCE(&waveChart);
|
||||
waveChart.init();
|
||||
|
||||
setCurveValue(config->cltFuelCorrBins, config->cltFuelCorr, CLT_CURVE_SIZE, -40, 1.5);
|
||||
setCurveValue(config->cltFuelCorrBins, config->cltFuelCorr, CLT_CURVE_SIZE, -30, 1.5);
|
||||
setCurveValue(config->cltFuelCorrBins, config->cltFuelCorr, CLT_CURVE_SIZE, -20, 1.42);
|
||||
|
|
Loading…
Reference in New Issue