auto-sync
This commit is contained in:
parent
7d6a4dd7f8
commit
28ee84c333
|
@ -27,8 +27,8 @@
|
|||
|
||||
EXTERN_ENGINE;
|
||||
|
||||
static ign_Map3D_t advanceMap;
|
||||
static ign_Map3D_t iatAdvanceCorrectionMap;
|
||||
static ign_Map3D_t advanceMap("advance");
|
||||
static ign_Map3D_t iatAdvanceCorrectionMap("iat corr");
|
||||
|
||||
static const float iatTimingRpmBins[IGN_LOAD_COUNT] = {880, 1260, 1640, 2020, 2400, 2780, 3000, 3380, 3760, 4140, 4520, 5000, 5700, 6500, 7200, 8000};
|
||||
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
EXTERN_ENGINE
|
||||
;
|
||||
|
||||
static fuel_Map3D_t fuelMap;
|
||||
static fuel_Map3D_t fuelPhaseMap;
|
||||
static fuel_Map3D_t fuelMap("fuel");
|
||||
static fuel_Map3D_t fuelPhaseMap("fl ph");
|
||||
extern fuel_Map3D_t ve2Map;
|
||||
extern fuel_Map3D_t afrMap;
|
||||
extern baroCorr_Map3D_t baroCorrMap;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <math.h>
|
||||
#include "error_handling.h"
|
||||
#include "interpolation.h"
|
||||
#include "efilib.h"
|
||||
|
||||
// 'random' value to be sure we are not treating any non-zero trash as TRUE
|
||||
#define MAGIC_TRUE_VALUE 153351512
|
||||
|
@ -17,7 +18,7 @@
|
|||
template<int RPM_BIN_SIZE, int LOAD_BIN_SIZE>
|
||||
class Map3D {
|
||||
public:
|
||||
Map3D();
|
||||
Map3D(const char*name);
|
||||
void init(float table[RPM_BIN_SIZE][LOAD_BIN_SIZE], float loadBins[LOAD_BIN_SIZE], float rpmBins[RPM_BIN_SIZE]);
|
||||
float getValue(float x, float rpm);
|
||||
void setAll(float value);
|
||||
|
@ -26,6 +27,7 @@ private:
|
|||
float *loadBins;
|
||||
float *rpmBins;
|
||||
int initialized;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
template<int SIZE>
|
||||
|
@ -79,11 +81,16 @@ void Map3D<RPM_BIN_SIZE, LOAD_BIN_SIZE>::init(float table[RPM_BIN_SIZE][LOAD_BIN
|
|||
template<int RPM_BIN_SIZE, int LOAD_BIN_SIZE>
|
||||
float Map3D<RPM_BIN_SIZE, LOAD_BIN_SIZE>::getValue(float x, float rpm) {
|
||||
efiAssert(initialized == MAGIC_TRUE_VALUE, "map not initialized", NAN);
|
||||
if (cisnan(x)) {
|
||||
warning(OBD_PCM_Processor_Fault, "%s: x is NaN", name);
|
||||
return NAN;
|
||||
}
|
||||
return interpolate3d(x, loadBins, LOAD_BIN_SIZE, rpm, rpmBins, RPM_BIN_SIZE, pointers);
|
||||
}
|
||||
|
||||
template<int RPM_BIN_SIZE, int LOAD_BIN_SIZE>
|
||||
Map3D<RPM_BIN_SIZE, LOAD_BIN_SIZE>::Map3D() {
|
||||
Map3D<RPM_BIN_SIZE, LOAD_BIN_SIZE>::Map3D(const char *name) {
|
||||
this->name = name;
|
||||
initialized = 0;
|
||||
memset(&pointers, 0, sizeof(pointers));
|
||||
loadBins = NULL;
|
||||
|
|
|
@ -22,10 +22,10 @@
|
|||
#define rpmMin 500
|
||||
#define rpmMax 8000
|
||||
|
||||
fuel_Map3D_t veMap;
|
||||
fuel_Map3D_t ve2Map;
|
||||
fuel_Map3D_t afrMap;
|
||||
baroCorr_Map3D_t baroCorrMap;
|
||||
fuel_Map3D_t veMap("VE");
|
||||
fuel_Map3D_t ve2Map("VE2");
|
||||
fuel_Map3D_t afrMap("AFR");
|
||||
baroCorr_Map3D_t baroCorrMap("baro");
|
||||
|
||||
#define tpMin 0
|
||||
#define tpMax 100
|
||||
|
|
|
@ -275,5 +275,5 @@ int getRusEfiVersion(void) {
|
|||
return 123; // this is here to make the compiler happy about the unused array
|
||||
if (UNUSED_CCM_SIZE[0] * 0 != 0)
|
||||
return 3211; // this is here to make the compiler happy about the unused array
|
||||
return 20151226;
|
||||
return 20151227;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue