auto-sync
This commit is contained in:
parent
4e5a870f7f
commit
c090367272
|
@ -241,7 +241,7 @@ void handlePageSelectCommand(ts_channel_s *tsChannel, ts_response_format_e mode,
|
||||||
tsSendResponse(tsChannel, mode, NULL, 0);
|
tsSendResponse(tsChannel, mode, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void onlineTuneBytes(int currentPageId, int offset, int count) {
|
static void onlineTuneBytes(int currentPageId, uint32_t offset, int count) {
|
||||||
if (offset > sizeof(engine_configuration_s)) {
|
if (offset > sizeof(engine_configuration_s)) {
|
||||||
int maxSize = sizeof(persistent_config_s) - offset;
|
int maxSize = sizeof(persistent_config_s) - offset;
|
||||||
if (count > maxSize) {
|
if (count > maxSize) {
|
||||||
|
|
|
@ -768,7 +768,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
||||||
|
|
||||||
tsOutputChannels->clutchUpState = engine->clutchUpState;
|
tsOutputChannels->clutchUpState = engine->clutchUpState;
|
||||||
tsOutputChannels->clutchDownState = engine->clutchDownState;
|
tsOutputChannels->clutchDownState = engine->clutchDownState;
|
||||||
tsOutputChannels->tCharge = getTCharge(rpm, tps, coolant, intake);
|
tsOutputChannels->tCharge = getTCharge(rpm, tps, coolant, intake PASS_ENGINE_PARAMETER);
|
||||||
float timing = engine->engineState.timingAdvance;
|
float timing = engine->engineState.timingAdvance;
|
||||||
tsOutputChannels->ignitionAdvance = timing > 360 ? timing - 720 : timing;
|
tsOutputChannels->ignitionAdvance = timing > 360 ? timing - 720 : timing;
|
||||||
tsOutputChannels->sparkDwell = ENGINE(engineState.sparkDwell);
|
tsOutputChannels->sparkDwell = ENGINE(engineState.sparkDwell);
|
||||||
|
|
|
@ -190,7 +190,7 @@ void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
float coolantC = ENGINE(engineState.clt);
|
float coolantC = ENGINE(engineState.clt);
|
||||||
float intakeC = ENGINE(engineState.iat);
|
float intakeC = ENGINE(engineState.iat);
|
||||||
float tps = getTPS(PASS_ENGINE_PARAMETER_F);
|
float tps = getTPS(PASS_ENGINE_PARAMETER_F);
|
||||||
tChargeK = convertCelsiusToKelvin(getTCharge(rpm, tps, coolantC, intakeC));
|
tChargeK = convertCelsiusToKelvin(getTCharge(rpm, tps, coolantC, intakeC PASS_ENGINE_PARAMETER));
|
||||||
float map = getMap();
|
float map = getMap();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Oct 02 13:12:05 EDT 2016
|
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Oct 11 20:15:08 EDT 2016
|
||||||
// begin
|
// begin
|
||||||
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
||||||
#define ENGINE_CONFIGURATION_GENERATED_H_
|
#define ENGINE_CONFIGURATION_GENERATED_H_
|
||||||
|
@ -1798,7 +1798,7 @@ typedef struct {
|
||||||
*/
|
*/
|
||||||
float crankingCycleBins[CRANKING_CURVE_SIZE];
|
float crankingCycleBins[CRANKING_CURVE_SIZE];
|
||||||
/**
|
/**
|
||||||
* CLT-based adjustment for simple manual idle controller
|
* CLT-based idle position multiplier for simple manual idle controller
|
||||||
* offset 7032
|
* offset 7032
|
||||||
*/
|
*/
|
||||||
float cltIdleCorrBins[CLT_CURVE_SIZE];
|
float cltIdleCorrBins[CLT_CURVE_SIZE];
|
||||||
|
@ -1959,4 +1959,4 @@ typedef struct {
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// end
|
// end
|
||||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Oct 02 13:12:05 EDT 2016
|
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Tue Oct 11 20:15:08 EDT 2016
|
||||||
|
|
|
@ -14,14 +14,11 @@
|
||||||
#include "engine_math.h"
|
#include "engine_math.h"
|
||||||
#include "engine_state.h"
|
#include "engine_state.h"
|
||||||
|
|
||||||
#define K_AT_MIN_RPM_MIN_TPS 0.25
|
|
||||||
#define K_AT_MIN_RPM_MAX_TPS 0.25
|
|
||||||
#define K_AT_MAX_RPM_MIN_TPS 0.25
|
|
||||||
#define K_AT_MAX_RPM_MAX_TPS 0.9
|
|
||||||
|
|
||||||
#define rpmMin 500
|
#define rpmMin 500
|
||||||
#define rpmMax 8000
|
#define rpmMax 8000
|
||||||
|
|
||||||
|
EXTERN_ENGINE;
|
||||||
|
|
||||||
fuel_Map3D_t veMap("VE");
|
fuel_Map3D_t veMap("VE");
|
||||||
fuel_Map3D_t ve2Map("VE2");
|
fuel_Map3D_t ve2Map("VE2");
|
||||||
afr_Map3D_t afrMap("AFR", 1.0 / AFR_STORAGE_MULT);
|
afr_Map3D_t afrMap("AFR", 1.0 / AFR_STORAGE_MULT);
|
||||||
|
@ -30,11 +27,11 @@ baroCorr_Map3D_t baroCorrMap("baro");
|
||||||
#define tpMin 0
|
#define tpMin 0
|
||||||
#define tpMax 100
|
#define tpMax 100
|
||||||
// http://rusefi.com/math/t_charge.html
|
// http://rusefi.com/math/t_charge.html
|
||||||
float getTCharge(int rpm, float tps, float coolantTemp, float airTemp) {
|
float getTCharge(int rpm, float tps, float coolantTemp, float airTemp DECLARE_ENGINE_PARAMETER_S) {
|
||||||
float minRpmKcurrentTPS = interpolate(tpMin, K_AT_MIN_RPM_MIN_TPS, tpMax,
|
float minRpmKcurrentTPS = interpolate(tpMin, engineConfiguration->tChargeMinRpmMinTps, tpMax,
|
||||||
K_AT_MIN_RPM_MAX_TPS, tps);
|
engineConfiguration->tChargeMinRpmMaxTps, tps);
|
||||||
float maxRpmKcurrentTPS = interpolate(tpMin, K_AT_MAX_RPM_MIN_TPS, tpMax,
|
float maxRpmKcurrentTPS = interpolate(tpMin, engineConfiguration->tChargeMaxRpmMinTps, tpMax,
|
||||||
K_AT_MAX_RPM_MAX_TPS, tps);
|
engineConfiguration->tChargeMaxRpmMaxTps, tps);
|
||||||
|
|
||||||
float Tcharge_coff = interpolate(rpmMin, minRpmKcurrentTPS, rpmMax, maxRpmKcurrentTPS, rpm);
|
float Tcharge_coff = interpolate(rpmMin, minRpmKcurrentTPS, rpmMax, maxRpmKcurrentTPS, rpm);
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include "engine.h"
|
#include "engine.h"
|
||||||
|
|
||||||
float getTCharge(int rpm, float tps, float coolantTemp, float airTemp);
|
float getTCharge(int rpm, float tps, float coolantTemp, float airTemp DECLARE_ENGINE_PARAMETER_S);
|
||||||
void setDetaultVETable(persistent_config_s *config);
|
void setDetaultVETable(persistent_config_s *config);
|
||||||
float getAirMass(engine_configuration_s *engineConfiguration, float VE, float MAP, float tempK);
|
float getAirMass(engine_configuration_s *engineConfiguration, float VE, float MAP, float tempK);
|
||||||
float sdMath(engine_configuration_s *engineConfiguration, float airMass, float AFR);
|
float sdMath(engine_configuration_s *engineConfiguration, float airMass, float AFR);
|
||||||
|
|
|
@ -732,10 +732,10 @@ float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300,
|
||||||
brain_input_pin_e camInput;
|
brain_input_pin_e camInput;
|
||||||
pid_dt[AUX_PID_COUNT iterate] auxPidDT;
|
pid_dt[AUX_PID_COUNT iterate] auxPidDT;
|
||||||
float crankingIdleAdjustment;Extra idle while cranking;"percent", 1, 0, -100.0, 100,
|
float crankingIdleAdjustment;Extra idle while cranking;"percent", 1, 0, -100.0, 100,
|
||||||
float tChargeMinRpmMinTps;
|
float tChargeMinRpmMinTps;;"mult", 1, 0, 0, 3, 4
|
||||||
float tChargeMinRpmMaxTps;
|
float tChargeMinRpmMaxTps;;"mult", 1, 0, 0, 3, 4
|
||||||
float tChargeMaxRpmMinTps;
|
float tChargeMaxRpmMinTps;;"mult", 1, 0, 0, 3, 4
|
||||||
float tChargeMaxRpmMaxTps;
|
float tChargeMaxRpmMaxTps;;"mult", 1, 0, 0, 3, 4
|
||||||
brain_pin_e[AUX_PID_COUNT iterate] auxPidPins;
|
brain_pin_e[AUX_PID_COUNT iterate] auxPidPins;
|
||||||
fsio_pwm_freq_t[AUX_PID_COUNT iterate] auxPidFrequency;
|
fsio_pwm_freq_t[AUX_PID_COUNT iterate] auxPidFrequency;
|
||||||
int alternatorPwmFrequency;;"Hz", 1, 0, 0, 3000.0, 0
|
int alternatorPwmFrequency;;"Hz", 1, 0, 0, 3000.0, 0
|
||||||
|
|
|
@ -294,5 +294,5 @@ int getRusEfiVersion(void) {
|
||||||
return 123; // this is here to make the compiler happy about the unused array
|
return 123; // this is here to make the compiler happy about the unused array
|
||||||
if (UNUSED_CCM_SIZE[0] * 0 != 0)
|
if (UNUSED_CCM_SIZE[0] * 0 != 0)
|
||||||
return 3211; // this is here to make the compiler happy about the unused array
|
return 3211; // this is here to make the compiler happy about the unused array
|
||||||
return 20161010;
|
return 20161011;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1345,6 +1345,7 @@ fileVersion = { 20160702 }
|
||||||
subMenu = baroCorrTbl, "Baro Correction", 0, {fuelAlgorithm == 3}
|
subMenu = baroCorrTbl, "Baro Correction", 0, {fuelAlgorithm == 3}
|
||||||
subMenu = std_separator
|
subMenu = std_separator
|
||||||
subMenu = std_realtime, "&Realtime Display", 0
|
subMenu = std_realtime, "&Realtime Display", 0
|
||||||
|
subMenu = tChargeSettings, "tCharge Settings"
|
||||||
|
|
||||||
menu = "3D Map Tuning"
|
menu = "3D Map Tuning"
|
||||||
; subMenu = std_realtime, "Realtime Display"
|
; subMenu = std_realtime, "Realtime Display"
|
||||||
|
@ -1426,6 +1427,11 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01"
|
||||||
|
|
||||||
|
|
||||||
[UserDefined]
|
[UserDefined]
|
||||||
|
dialog = tChargeSettings, "tChart Settings"
|
||||||
|
field = "MinRpm MinTps", tChargeMinRpmMinTps
|
||||||
|
field = "MinRpm MaxTps", tChargeMinRpmMaxTps
|
||||||
|
field = "MaxRpm MinTps", tChargeMaxRpmMinTps
|
||||||
|
field = "MaxRpm MaxTps", tChargeMaxRpmMaxTps
|
||||||
|
|
||||||
dialog = baseInjection, "Injection"
|
dialog = baseInjection, "Injection"
|
||||||
field = "Enabled", isInjectionEnabled
|
field = "Enabled", isInjectionEnabled
|
||||||
|
|
|
@ -30,8 +30,7 @@ void testEngineMath(void) {
|
||||||
printf("*************************************************** testEngineMath\r\n");
|
printf("*************************************************** testEngineMath\r\n");
|
||||||
|
|
||||||
EngineTestHelper eth(FORD_ESCORT_GT);
|
EngineTestHelper eth(FORD_ESCORT_GT);
|
||||||
Engine * engine = ð.engine;
|
EXPAND_EngineTestHelper;
|
||||||
engine_configuration_s *engineConfiguration = engine->engineConfiguration;
|
|
||||||
|
|
||||||
engineConfiguration->operationMode = FOUR_STROKE_CAM_SENSOR;
|
engineConfiguration->operationMode = FOUR_STROKE_CAM_SENSOR;
|
||||||
|
|
||||||
|
@ -39,14 +38,14 @@ void testEngineMath(void) {
|
||||||
assertEqualsM("6000 RPM", 5, getOneDegreeTimeMs(6000) * 180);
|
assertEqualsM("6000 RPM", 5, getOneDegreeTimeMs(6000) * 180);
|
||||||
|
|
||||||
|
|
||||||
assertEquals(312.5, getTCharge(1000, 0, 300, 350));
|
assertEquals(312.5, getTCharge(1000, 0, 300, 350 PASS_ENGINE_PARAMETER));
|
||||||
assertEquals(313.5833, getTCharge(1000, 50, 300, 350));
|
assertEquals(313.5833, getTCharge(1000, 50, 300, 350 PASS_ENGINE_PARAMETER));
|
||||||
assertEquals(314.6667, getTCharge(1000, 100, 300, 350));
|
assertEquals(314.6667, getTCharge(1000, 100, 300, 350 PASS_ENGINE_PARAMETER));
|
||||||
|
|
||||||
|
|
||||||
assertEquals(312.5, getTCharge(4000, 0, 300, 350));
|
assertEquals(312.5, getTCharge(4000, 0, 300, 350 PASS_ENGINE_PARAMETER));
|
||||||
assertEquals(320.0833, getTCharge(4000, 50, 300, 350));
|
assertEquals(320.0833, getTCharge(4000, 50, 300, 350 PASS_ENGINE_PARAMETER));
|
||||||
assertEquals(327.6667, getTCharge(4000, 100, 300, 350));
|
assertEquals(327.6667, getTCharge(4000, 100, 300, 350 PASS_ENGINE_PARAMETER));
|
||||||
}
|
}
|
||||||
|
|
||||||
void testIgnitionMapGenerator(void) {
|
void testIgnitionMapGenerator(void) {
|
||||||
|
|
Loading…
Reference in New Issue