This commit is contained in:
parent
66d5fb896e
commit
e78b4f25a1
|
@ -50,6 +50,9 @@ void prepareVoidConfiguration(engine_configuration_s *activeConfiguration);
|
|||
void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||
void setTargetRpmCurve(int rpm DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void setAfrMap(afr_table_t table, float value);
|
||||
/**
|
||||
* See also setLinearCurve()
|
||||
*/
|
||||
void setMap(fuel_table_t table, float value);
|
||||
void setWholeFuelMap(float value DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
void setWholeIgnitionIatCorr(float value DECLARE_ENGINE_PARAMETER_SUFFIX);
|
||||
|
|
|
@ -5,6 +5,13 @@
|
|||
* @date Jan 20, 2018
|
||||
*/
|
||||
|
||||
#define ASIZE 16
|
||||
|
||||
/* rpm bins */
|
||||
static const float rpmBins[ASIZE] = {500.0, 1000.0, 1500.0, 2000.0, 2500.0, 3000.0, 3500.0, 4000.0, 4500.0, 5000.0, 5500.0, 6000.0, 6500.0, 7000.0, 7500.0, 8000.0};
|
||||
|
||||
|
||||
static const float voltageBins[ASIZE] = {0.200000, 0.490000, 0.770000, 1.060000, 1.350000, 1.630000, 1.920000, 2.210000, 2.490000, 2.780000, 3.070000, 3.350000, 3.640000, 3.930000, 4.210000, 4.500000};
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
/*
|
||||
* @file afm2mapConverter.cpp
|
||||
*
|
||||
* Helper code for https://github.com/rusefi/rusefi/issues/538 conversion RPM,MAP>MAF to RPM,MAF>MAP
|
||||
* @author Andrey Belomutskiy, (c) 2012-2018
|
||||
* @date Jan 20, 2018
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "afm2mapConverter.h"
|
||||
#include "table_helper.h"
|
||||
|
||||
#define ASIZE 16
|
||||
|
||||
/* rpm bins */
|
||||
|
@ -30,3 +36,25 @@ static const float afr2map[ASIZE][ASIZE]= {
|
|||
{/* 15 8000.000 *//* 0 500.0*/0.450, /* 1 1000.0*/0.450, /* 2 1500.0*/0.430, /* 3 2000.0*/0.360, /* 4 2500.0*/0.320, /* 5 3000.0*/0.330, /* 6 3500.0*/0.310, /* 7 4000.0*/0.300, /* 8 4500.0*/0.290, /* 9 5000.0*/0.290, /* 10 5500.0*/0.280, /* 11 6000.0*/0.270, /* 12 6500.0*/0.270, /* 13 7000.0*/0.260, /* 14 7500.0*/0.230, /* 15 8000.0*/0.230, },
|
||||
};
|
||||
|
||||
float PSI_BINS[ASIZE];
|
||||
float V_BINS[ASIZE];
|
||||
|
||||
void printConvertedTable() {
|
||||
printf("printConvertedTable for miata 1.6\n");
|
||||
|
||||
setLinearCurve(V_BINS, ASIZE, 0.2, 4.5 , 0.01);
|
||||
for (int i = 0; i< ASIZE;i++) {
|
||||
printf("%f, ", V_BINS[i]);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
|
||||
setLinearCurve(PSI_BINS, ASIZE, -14.5, 18 ,0.1);
|
||||
for (int i = 0; i< ASIZE;i++) {
|
||||
printf("%f, ", PSI_BINS[i]);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* @file afm2mapConverter.h
|
||||
*
|
||||
* @author Andrey Belomutskiy, (c) 2012-2018
|
||||
* @date Jan 20, 2018
|
||||
*/
|
||||
|
||||
#ifndef AFM2MAPCONVERTER_H_
|
||||
#define AFM2MAPCONVERTER_H_
|
||||
|
||||
void printConvertedTable();
|
||||
|
||||
#endif /* AFM2MAPCONVERTER_H_ */
|
|
@ -25,7 +25,7 @@
|
|||
#include "engine_configuration.h"
|
||||
|
||||
#include "test_idle_controller.h"
|
||||
|
||||
#include "afm2mapConverter.h"
|
||||
#include "test_signal_executor.h"
|
||||
#include "trigger_central.h"
|
||||
#include "test_util.h"
|
||||
|
@ -176,8 +176,9 @@ int main(void) {
|
|||
testTriggerDecoder();
|
||||
|
||||
// resizeMap();
|
||||
printf("Success 20161031\r\n");
|
||||
printf("Success 20180120\r\n");
|
||||
printAllTriggers();
|
||||
// printConvertedTable();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue