auto-sync
This commit is contained in:
parent
cf287775d4
commit
0a90863bde
|
@ -201,9 +201,9 @@ void printSensors(Logging *log, bool fileFormat) {
|
||||||
|
|
||||||
|
|
||||||
void writeLogLine(void) {
|
void writeLogLine(void) {
|
||||||
|
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
|
||||||
if (!main_loop_started)
|
if (!main_loop_started)
|
||||||
return;
|
return;
|
||||||
#if EFI_FILE_LOGGING || defined(__DOXYGEN__)
|
|
||||||
resetLogging(&fileLogger);
|
resetLogging(&fileLogger);
|
||||||
printSensors(&fileLogger, true);
|
printSensors(&fileLogger, true);
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
template<int RPM_BIN_SIZE, int LOAD_BIN_SIZE>
|
template<int RPM_BIN_SIZE, int LOAD_BIN_SIZE>
|
||||||
class Map3D {
|
class Map3D {
|
||||||
public:
|
public:
|
||||||
|
Map3D();
|
||||||
void init(float table[RPM_BIN_SIZE][LOAD_BIN_SIZE], float loadBins[LOAD_BIN_SIZE], float rpmBins[RPM_BIN_SIZE]);
|
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);
|
float getValue(float x, float rpm);
|
||||||
void setAll(float value);
|
void setAll(float value);
|
||||||
|
@ -81,6 +82,12 @@ float Map3D<RPM_BIN_SIZE, LOAD_BIN_SIZE>::getValue(float x, float rpm) {
|
||||||
return interpolate3d(x, loadBins, LOAD_BIN_SIZE, rpm, rpmBins, RPM_BIN_SIZE, pointers);
|
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() {
|
||||||
|
initialized = 0;
|
||||||
|
memset(&pointers, 0, sizeof(pointers));
|
||||||
|
}
|
||||||
|
|
||||||
template<int RPM_BIN_SIZE, int LOAD_BIN_SIZE>
|
template<int RPM_BIN_SIZE, int LOAD_BIN_SIZE>
|
||||||
void Map3D<RPM_BIN_SIZE, LOAD_BIN_SIZE>::setAll(float value) {
|
void Map3D<RPM_BIN_SIZE, LOAD_BIN_SIZE>::setAll(float value) {
|
||||||
efiAssertVoid(initialized == MAGIC_TRUE_VALUE, "map not initialized");
|
efiAssertVoid(initialized == MAGIC_TRUE_VALUE, "map not initialized");
|
||||||
|
|
|
@ -66,7 +66,7 @@ extern bool hasFirmwareErrorFlag;
|
||||||
|
|
||||||
persistent_config_container_s persistentState CCM_OPTIONAL;
|
persistent_config_container_s persistentState CCM_OPTIONAL;
|
||||||
|
|
||||||
persistent_config_s *config;
|
persistent_config_s *config = &persistentState.persistentConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* todo: it really looks like these fields should become 'static', i.e. private
|
* todo: it really looks like these fields should become 'static', i.e. private
|
||||||
|
|
|
@ -107,6 +107,7 @@ void setDetaultVETable(engine_configuration_s *engineConfiguration) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void initSpeedDensity(persistent_config_s *config) {
|
void initSpeedDensity(persistent_config_s *config) {
|
||||||
|
efiAssertVoid(config!=NULL, "config is NULL");
|
||||||
engine_configuration_s *e = &config->engineConfiguration;
|
engine_configuration_s *e = &config->engineConfiguration;
|
||||||
veMap.init(e->veTable, e->veLoadBins, e->veRpmBins);
|
veMap.init(e->veTable, e->veLoadBins, e->veRpmBins);
|
||||||
ve2Map.init(e->ve2Table, e->ve2LoadBins, e->ve2RpmBins);
|
ve2Map.init(e->ve2Table, e->ve2LoadBins, e->ve2RpmBins);
|
||||||
|
|
|
@ -29,11 +29,6 @@
|
||||||
#include "trigger_emulator.h"
|
#include "trigger_emulator.h"
|
||||||
#include "engine_controller.h"
|
#include "engine_controller.h"
|
||||||
|
|
||||||
// todo: reuse the instance from engine_controller?
|
|
||||||
|
|
||||||
//static Engine _engine;
|
|
||||||
//Engine *engine = &_engine;
|
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
extern engine_configuration2_s * engineConfiguration2;
|
extern engine_configuration2_s * engineConfiguration2;
|
||||||
|
|
||||||
|
@ -79,7 +74,6 @@ void rusEfiFunctionalTest(void) {
|
||||||
initStatusLoop(engine);
|
initStatusLoop(engine);
|
||||||
initDataStructures(PASS_ENGINE_PARAMETER_F);
|
initDataStructures(PASS_ENGINE_PARAMETER_F);
|
||||||
|
|
||||||
engine->engineConfiguration = engineConfiguration;
|
|
||||||
engine->engineConfiguration2 = engineConfiguration2;
|
engine->engineConfiguration2 = engineConfiguration2;
|
||||||
|
|
||||||
// todo: reduce code duplication with initEngineContoller
|
// todo: reduce code duplication with initEngineContoller
|
||||||
|
|
Loading…
Reference in New Issue