auto-sync
This commit is contained in:
parent
77b4a6d82f
commit
d6158c58a0
|
@ -14,14 +14,15 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "bmw_e34.h"
|
#include "bmw_e34.h"
|
||||||
#include "thermistors.h"
|
#include "thermistors.h"
|
||||||
|
#include "settings.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
void setBmwE34(DECLARE_ENGINE_PARAMETER_F) {
|
void setBmwE34(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
board_configuration_s * boardConfiguration = &engineConfiguration->bc;
|
board_configuration_s * boardConfiguration = &engineConfiguration->bc;
|
||||||
|
|
||||||
// engineConfiguration->algorithm = LM_PLAIN_MAF;
|
// setAlgorithm(LM_PLAIN_MAF);
|
||||||
engineConfiguration->algorithm = LM_SPEED_DENSITY;
|
setAlgorithm(LM_SPEED_DENSITY);
|
||||||
engineConfiguration->injector.flow = 750;
|
engineConfiguration->injector.flow = 750;
|
||||||
|
|
||||||
boardConfiguration->tunerStudioSerialSpeed = 38400;
|
boardConfiguration->tunerStudioSerialSpeed = 38400;
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
#include "thermistors.h"
|
#include "thermistors.h"
|
||||||
#include "citroenBerlingoTU3JP.h"
|
#include "citroenBerlingoTU3JP.h"
|
||||||
|
#include "settings.h"
|
||||||
|
|
||||||
void setLCD(board_configuration_s *boardConfiguration) {
|
void setLCD(board_configuration_s *boardConfiguration) {
|
||||||
boardConfiguration->HD44780_rs = GPIOE_7;
|
boardConfiguration->HD44780_rs = GPIOE_7;
|
||||||
|
@ -99,10 +100,9 @@ void setCitroenBerlingoTU3JPConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
/**
|
/**
|
||||||
* Algorithm Alpha-N setting
|
* Algorithm Alpha-N setting
|
||||||
*/
|
*/
|
||||||
engineConfiguration->algorithm = LM_ALPHA_N;
|
setAlgorithm(LM_ALPHA_N);
|
||||||
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER);
|
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER);
|
||||||
setFuelRpmBin(800, 7000 PASS_ENGINE_PARAMETER);
|
setFuelRpmBin(800, 7000 PASS_ENGINE_PARAMETER);
|
||||||
setTimingLoadBin(0, 100 PASS_ENGINE_PARAMETER);
|
|
||||||
setTimingRpmBin(800, 7000 PASS_ENGINE_PARAMETER);
|
setTimingRpmBin(800, 7000 PASS_ENGINE_PARAMETER);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include "thermistors.h"
|
#include "thermistors.h"
|
||||||
#include "honda_accord.h"
|
#include "honda_accord.h"
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
|
#include "settings.h"
|
||||||
|
|
||||||
void setFrankenso_01_LCD(board_configuration_s *boardConfiguration) {
|
void setFrankenso_01_LCD(board_configuration_s *boardConfiguration) {
|
||||||
boardConfiguration->HD44780_rs = GPIOE_7;
|
boardConfiguration->HD44780_rs = GPIOE_7;
|
||||||
|
@ -51,9 +52,8 @@ static void setHondaAccordConfigurationCommon(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
|
|
||||||
// engineConfiguration->algorithm = LM_SPEED_DENSITY;
|
// engineConfiguration->algorithm = LM_SPEED_DENSITY;
|
||||||
// I want to start with a simple Alpha-N
|
// I want to start with a simple Alpha-N
|
||||||
engineConfiguration->algorithm = LM_ALPHA_N;
|
setAlgorithm(LM_ALPHA_N);
|
||||||
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER);
|
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER);
|
||||||
setTimingLoadBin(0, 100 PASS_ENGINE_PARAMETER);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 18K Ohm @ -20C
|
* 18K Ohm @ -20C
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "custom_engine.h"
|
#include "custom_engine.h"
|
||||||
#include "allsensors.h"
|
#include "allsensors.h"
|
||||||
#include "fsio_impl.h"
|
#include "fsio_impl.h"
|
||||||
|
#include "settings.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
|
@ -41,9 +42,8 @@ void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
engineConfiguration->tpsMin = 80;
|
engineConfiguration->tpsMin = 80;
|
||||||
engineConfiguration->tpsMax = 764;
|
engineConfiguration->tpsMax = 764;
|
||||||
|
|
||||||
engineConfiguration->algorithm = LM_ALPHA_N;
|
setAlgorithm(LM_ALPHA_N);
|
||||||
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER);
|
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER);
|
||||||
setTimingLoadBin(0, 100 PASS_ENGINE_PARAMETER);
|
|
||||||
|
|
||||||
// set_whole_fuel_map 9
|
// set_whole_fuel_map 9
|
||||||
setWholeFuelMap(9 PASS_ENGINE_PARAMETER);
|
setWholeFuelMap(9 PASS_ENGINE_PARAMETER);
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "console_io.h"
|
#include "console_io.h"
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
#include "efiGpio.h"
|
#include "efiGpio.h"
|
||||||
|
#include "engine_math.h"
|
||||||
|
|
||||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
#include "rusefi.h"
|
#include "rusefi.h"
|
||||||
|
@ -38,7 +39,6 @@ extern int waveChartUsedSize;
|
||||||
extern WaveChart waveChart;
|
extern WaveChart waveChart;
|
||||||
#endif /* EFI_WAVE_CHART */
|
#endif /* EFI_WAVE_CHART */
|
||||||
|
|
||||||
|
|
||||||
static char LOGGING_BUFFER[1000];
|
static char LOGGING_BUFFER[1000];
|
||||||
static Logging logger("settings control", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
|
static Logging logger("settings control", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
|
||||||
|
|
||||||
|
@ -99,7 +99,8 @@ static void printOutputs(engine_configuration_s *engineConfiguration) {
|
||||||
scheduleMsg(&logger, "mainRelay: mode %s @ %s", getPin_output_mode_e(boardConfiguration->mainRelayPinMode),
|
scheduleMsg(&logger, "mainRelay: mode %s @ %s", getPin_output_mode_e(boardConfiguration->mainRelayPinMode),
|
||||||
hwPortname(boardConfiguration->mainRelayPin));
|
hwPortname(boardConfiguration->mainRelayPin));
|
||||||
|
|
||||||
scheduleMsg(&logger, "alternator field: mode %s @ %s", getPin_output_mode_e(boardConfiguration->alternatorControlPinMode),
|
scheduleMsg(&logger, "alternator field: mode %s @ %s",
|
||||||
|
getPin_output_mode_e(boardConfiguration->alternatorControlPinMode),
|
||||||
hwPortname(boardConfiguration->alternatorControlPin));
|
hwPortname(boardConfiguration->alternatorControlPin));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -433,8 +434,23 @@ static void setCrankingRpm(int value) {
|
||||||
doPrintConfiguration(engine);
|
doPrintConfiguration(engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setAlgorithm(int value) {
|
/**
|
||||||
engineConfiguration->algorithm = (engine_load_mode_e) value;
|
* this method sets algorithm and ignition table scale
|
||||||
|
*/
|
||||||
|
void setAlgorithm(engine_load_mode_e algo) {
|
||||||
|
engineConfiguration->algorithm = algo;
|
||||||
|
if (algo == LM_ALPHA_N) {
|
||||||
|
setTimingLoadBin(0, 100 PASS_ENGINE_PARAMETER);
|
||||||
|
} else if (algo == LM_SPEED_DENSITY) {
|
||||||
|
setTimingLoadBin(0, 160 PASS_ENGINE_PARAMETER);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this method is used in console - it also prints current configuration
|
||||||
|
*/
|
||||||
|
static void setAlgorithmInt(int value) {
|
||||||
|
setAlgorithmInt((engine_load_mode_e) value);
|
||||||
doPrintConfiguration(engine);
|
doPrintConfiguration(engine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -921,7 +937,7 @@ void initSettings(engine_configuration_s *engineConfiguration) {
|
||||||
|
|
||||||
addConsoleActionI("set_rpm_hard_limit", setRpmHardLimit);
|
addConsoleActionI("set_rpm_hard_limit", setRpmHardLimit);
|
||||||
addConsoleActionI("set_firing_order", setFiringOrder);
|
addConsoleActionI("set_firing_order", setFiringOrder);
|
||||||
addConsoleActionI("set_algorithm", setAlgorithm);
|
addConsoleActionI("set_algorithm", setAlgorithmInt);
|
||||||
addConsoleAction("stopengine", (Void) stopEngine);
|
addConsoleAction("stopengine", (Void) stopEngine);
|
||||||
|
|
||||||
// todo: refactor this - looks like all boolean flags should be controlled with less code duplication
|
// todo: refactor this - looks like all boolean flags should be controlled with less code duplication
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
void initSettings(engine_configuration_s *engineConfiguration);
|
void initSettings(engine_configuration_s *engineConfiguration);
|
||||||
|
void setAlgorithm(engine_load_mode_e algo);
|
||||||
void printSpiState(Logging *logger, board_configuration_s *boardConfiguration);
|
void printSpiState(Logging *logger, board_configuration_s *boardConfiguration);
|
||||||
void printConfiguration(engine_configuration_s *engineConfiguration);
|
void printConfiguration(engine_configuration_s *engineConfiguration);
|
||||||
void stopEngine(void);
|
void stopEngine(void);
|
||||||
|
|
|
@ -276,5 +276,5 @@ int getRusEfiVersion(void) {
|
||||||
return 1; // this is here to make the compiler happy about the unused array
|
return 1; // this is here to make the compiler happy about the unused array
|
||||||
if (UNUSED_CCM_SIZE[0] == 0)
|
if (UNUSED_CCM_SIZE[0] == 0)
|
||||||
return 1; // this is here to make the compiler happy about the unused array
|
return 1; // this is here to make the compiler happy about the unused array
|
||||||
return 20150319;
|
return 20150321;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue