auto-sync

This commit is contained in:
rusEfi 2015-03-21 12:12:29 -05:00
parent 4e263b31e6
commit 23d5474aaa
10 changed files with 28 additions and 26 deletions

View File

@ -14,7 +14,7 @@
#include "global.h"
#include "bmw_e34.h"
#include "thermistors.h"
#include "settings.h"
#include "engine_math.h"
EXTERN_ENGINE;
@ -22,7 +22,7 @@ void setBmwE34(DECLARE_ENGINE_PARAMETER_F) {
board_configuration_s * boardConfiguration = &engineConfiguration->bc;
// setAlgorithm(LM_PLAIN_MAF);
setAlgorithm(LM_SPEED_DENSITY);
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER);
engineConfiguration->injector.flow = 750;
boardConfiguration->tunerStudioSerialSpeed = 38400;

View File

@ -100,7 +100,7 @@ void setCitroenBerlingoTU3JPConfiguration(DECLARE_ENGINE_PARAMETER_F) {
/**
* Algorithm Alpha-N setting
*/
setAlgorithm(LM_ALPHA_N);
setAlgorithm(LM_ALPHA_N PASS_ENGINE_PARAMETER);
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER);
setFuelRpmBin(800, 7000 PASS_ENGINE_PARAMETER);
setTimingRpmBin(800, 7000 PASS_ENGINE_PARAMETER);

View File

@ -52,7 +52,7 @@ static void setHondaAccordConfigurationCommon(DECLARE_ENGINE_PARAMETER_F) {
// engineConfiguration->algorithm = LM_SPEED_DENSITY;
// I want to start with a simple Alpha-N
setAlgorithm(LM_ALPHA_N);
setAlgorithm(LM_ALPHA_N PASS_ENGINE_PARAMETER);
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER);
/**

View File

@ -42,7 +42,7 @@ void setMazda626EngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
engineConfiguration->tpsMin = 80;
engineConfiguration->tpsMax = 764;
setAlgorithm(LM_ALPHA_N);
setAlgorithm(LM_ALPHA_N PASS_ENGINE_PARAMETER);
setFuelLoadBin(0, 100 PASS_ENGINE_PARAMETER);
// set_whole_fuel_map 9

View File

@ -396,3 +396,15 @@ int isInjectionEnabled(engine_configuration_s *engineConfiguration) {
// todo: is this worth a method? should this be inlined?
return engineConfiguration->isInjectionEnabled;
}
/**
* this method sets algorithm and ignition table scale
*/
void setAlgorithm(engine_load_mode_e algo DECLARE_ENGINE_PARAMETER_S) {
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);
}
}

View File

@ -14,6 +14,8 @@
#include "table_helper.h"
#include "engine.h"
void setAlgorithm(engine_load_mode_e algo DECLARE_ENGINE_PARAMETER_S);
void findTriggerPosition(
event_trigger_position_s *position, angle_t angleOffset DECLARE_ENGINE_PARAMETER_S);

View File

@ -434,18 +434,6 @@ static void setCrankingRpm(int value) {
doPrintConfiguration(engine);
}
/**
* 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
*/

View File

@ -12,7 +12,6 @@
#include "engine.h"
void initSettings(engine_configuration_s *engineConfiguration);
void setAlgorithm(engine_load_mode_e algo);
void printSpiState(Logging *logger, board_configuration_s *boardConfiguration);
void printConfiguration(engine_configuration_s *engineConfiguration);
void stopEngine(void);

View File

@ -98,7 +98,7 @@ public class AutoTest {
msg = "2003 Neon running";
IoUtil.changeRpm(2000);
chart = nextChart();
x = 120;
x = 107;
assertWave(true, msg, chart, WaveChart.SPARK_1, 0.13299999999999998, 0.005, WaveReport.RATIO, x + 180, x + 540);
assertWaveNull(msg, chart, WaveChart.SPARK_2);
assertWave(true, msg, chart, WaveChart.SPARK_3, 0.13299999999999998, 0.005, WaveReport.RATIO, x, x + 360);
@ -255,7 +255,7 @@ public class AutoTest {
assertWaveFall(msg, chart, WaveChart.INJECTOR_3, 0.086, 417.04);
assertWaveFall(msg, chart, WaveChart.INJECTOR_4, 0.086, 594.04);
x = 22;
x = 16.32;
assertWave(chart, WaveChart.SPARK_1, 0.133, x, x + 180, x + 360, x + 540);
sendCommand("set_fuel_map 2200 4 15.66");
@ -332,7 +332,7 @@ public class AutoTest {
boolean failed = false;
try {
IoUtil.launchSimulator();
IoUtil.launchSimulator(true);
mainTestBody();
} catch (Throwable e) {
e.printStackTrace();

View File

@ -104,11 +104,12 @@ public class IoUtil {
FileLog.MAIN.logLine("Got first signal in " + (System.currentTimeMillis() - waitStart));
}
static void launchSimulator() throws InterruptedException {
if (!TcpConnector.getAvailablePorts().isEmpty())
throw new IllegalStateException("Port already binded on startup?");
ExecHelper.startSimulator();
static void launchSimulator(boolean startProcess) throws InterruptedException {
if (startProcess) {
if (!TcpConnector.getAvailablePorts().isEmpty())
throw new IllegalStateException("Port already binded on startup?");
ExecHelper.startSimulator();
}
// FileLog.rlog("Waiting for TCP port...");