Exemplo n.º 1
0
EngineTestHelper::EngineTestHelper(engine_type_e engineType) : engine (&persistentConfig) {
	ec = &persistentConfig.engineConfiguration;

	engineConfiguration = ec;
	board_configuration_s * boardConfiguration = &engineConfiguration->bc;
	persistent_config_s *config = &persistentConfig;

	setTableValue(config->cltFuelCorrBins, config->cltFuelCorr, CLT_CURVE_SIZE, -40, 1.5);
	setTableValue(config->cltFuelCorrBins, config->cltFuelCorr, CLT_CURVE_SIZE, -30, 1.5);
	setTableValue(config->cltFuelCorrBins, config->cltFuelCorr, CLT_CURVE_SIZE, -20, 1.42);
	setTableValue(config->cltFuelCorrBins, config->cltFuelCorr, CLT_CURVE_SIZE, -10, 1.36);
	setTableValue(config->cltFuelCorrBins, config->cltFuelCorr, CLT_CURVE_SIZE, 0, 1.28);
	setTableValue(config->cltFuelCorrBins, config->cltFuelCorr, CLT_CURVE_SIZE, 10, 1.19);
	setTableValue(config->cltFuelCorrBins, config->cltFuelCorr, CLT_CURVE_SIZE, 20, 1.12);
	setTableValue(config->cltFuelCorrBins, config->cltFuelCorr, CLT_CURVE_SIZE, 30, 1.10);
	setTableValue(config->cltFuelCorrBins, config->cltFuelCorr, CLT_CURVE_SIZE, 40, 1.06);
	setTableValue(config->cltFuelCorrBins, config->cltFuelCorr, CLT_CURVE_SIZE, 50, 1.06);
	setTableValue(config->cltFuelCorrBins, config->cltFuelCorr, CLT_CURVE_SIZE, 60, 1.03);
	setTableValue(config->cltFuelCorrBins, config->cltFuelCorr, CLT_CURVE_SIZE, 70, 1.01);


	engine.engineConfiguration2 = &ec2;

	Engine *engine = &this->engine;
	prepareFuelMap(PASS_ENGINE_PARAMETER_F);


	initSpeedDensity(PASS_ENGINE_PARAMETER_F);

	resetConfigurationExt(NULL, engineType PASS_ENGINE_PARAMETER);
	prepareShapes(PASS_ENGINE_PARAMETER_F);
	engine->engineConfiguration->mafAdcChannel = (adc_channel_e)TEST_MAF_CHANNEL;
}
Exemplo n.º 2
0
int main(void) {
	testOverflow64Counter();
	testInterpolate3d();
	testFindIndex();
	testInterpolate2d();
	testGpsParser();
	prepareFuelMap();
	testFuelMap();
	testEngineMath();
	testEventRegistry();
	testSensors();
	testCyclicBuffer();
	testCrc();

	testSignalExecutor();

	testHistogram();

	testTriggerDecoder();

	testMalfunctionCentral();

	testConsoleLogic();

	testAngleResolver();

	testPinHelper();
	testSetTableValue();

	testAccelEnrichment();

	testSpeedDensity();

	testFLStack();

	//	resizeMap();
	printf("Success 20130830\r\n");
	return EXIT_SUCCESS;
}
Exemplo n.º 3
0
void initDataStructures(engine_configuration_s *engineConfiguration) {
	prepareFuelMap(engineConfiguration);
	prepareTimingMap();
	initSpeedDensity(engineConfiguration);
}