auto-sync

This commit is contained in:
rusEfi 2016-10-11 21:03:00 -04:00
parent 4e5a870f7f
commit c090367272
10 changed files with 32 additions and 30 deletions

View File

@ -241,7 +241,7 @@ void handlePageSelectCommand(ts_channel_s *tsChannel, ts_response_format_e mode,
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)) {
int maxSize = sizeof(persistent_config_s) - offset;
if (count > maxSize) {

View File

@ -768,7 +768,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
tsOutputChannels->clutchUpState = engine->clutchUpState;
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;
tsOutputChannels->ignitionAdvance = timing > 360 ? timing - 720 : timing;
tsOutputChannels->sparkDwell = ENGINE(engineState.sparkDwell);

View File

@ -190,7 +190,7 @@ void EngineState::periodicFastCallback(DECLARE_ENGINE_PARAMETER_F) {
float coolantC = ENGINE(engineState.clt);
float intakeC = ENGINE(engineState.iat);
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();
/**

View File

@ -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
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
#define ENGINE_CONFIGURATION_GENERATED_H_
@ -1798,7 +1798,7 @@ typedef struct {
*/
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
*/
float cltIdleCorrBins[CLT_CURVE_SIZE];
@ -1959,4 +1959,4 @@ typedef struct {
#endif
// 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

View File

@ -14,14 +14,11 @@
#include "engine_math.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 rpmMax 8000
EXTERN_ENGINE;
fuel_Map3D_t veMap("VE");
fuel_Map3D_t ve2Map("VE2");
afr_Map3D_t afrMap("AFR", 1.0 / AFR_STORAGE_MULT);
@ -30,11 +27,11 @@ baroCorr_Map3D_t baroCorrMap("baro");
#define tpMin 0
#define tpMax 100
// http://rusefi.com/math/t_charge.html
float getTCharge(int rpm, float tps, float coolantTemp, float airTemp) {
float minRpmKcurrentTPS = interpolate(tpMin, K_AT_MIN_RPM_MIN_TPS, tpMax,
K_AT_MIN_RPM_MAX_TPS, tps);
float maxRpmKcurrentTPS = interpolate(tpMin, K_AT_MAX_RPM_MIN_TPS, tpMax,
K_AT_MAX_RPM_MAX_TPS, tps);
float getTCharge(int rpm, float tps, float coolantTemp, float airTemp DECLARE_ENGINE_PARAMETER_S) {
float minRpmKcurrentTPS = interpolate(tpMin, engineConfiguration->tChargeMinRpmMinTps, tpMax,
engineConfiguration->tChargeMinRpmMaxTps, tps);
float maxRpmKcurrentTPS = interpolate(tpMin, engineConfiguration->tChargeMaxRpmMinTps, tpMax,
engineConfiguration->tChargeMaxRpmMaxTps, tps);
float Tcharge_coff = interpolate(rpmMin, minRpmKcurrentTPS, rpmMax, maxRpmKcurrentTPS, rpm);

View File

@ -9,7 +9,7 @@
#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);
float getAirMass(engine_configuration_s *engineConfiguration, float VE, float MAP, float tempK);
float sdMath(engine_configuration_s *engineConfiguration, float airMass, float AFR);

View File

@ -732,10 +732,10 @@ float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300,
brain_input_pin_e camInput;
pid_dt[AUX_PID_COUNT iterate] auxPidDT;
float crankingIdleAdjustment;Extra idle while cranking;"percent", 1, 0, -100.0, 100,
float tChargeMinRpmMinTps;
float tChargeMinRpmMaxTps;
float tChargeMaxRpmMinTps;
float tChargeMaxRpmMaxTps;
float tChargeMinRpmMinTps;;"mult", 1, 0, 0, 3, 4
float tChargeMinRpmMaxTps;;"mult", 1, 0, 0, 3, 4
float tChargeMaxRpmMinTps;;"mult", 1, 0, 0, 3, 4
float tChargeMaxRpmMaxTps;;"mult", 1, 0, 0, 3, 4
brain_pin_e[AUX_PID_COUNT iterate] auxPidPins;
fsio_pwm_freq_t[AUX_PID_COUNT iterate] auxPidFrequency;
int alternatorPwmFrequency;;"Hz", 1, 0, 0, 3000.0, 0

View File

@ -294,5 +294,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 20161010;
return 20161011;
}

View File

@ -1345,6 +1345,7 @@ fileVersion = { 20160702 }
subMenu = baroCorrTbl, "Baro Correction", 0, {fuelAlgorithm == 3}
subMenu = std_separator
subMenu = std_realtime, "&Realtime Display", 0
subMenu = tChargeSettings, "tCharge Settings"
menu = "3D Map Tuning"
; subMenu = std_realtime, "Realtime Display"
@ -1426,6 +1427,11 @@ cmd_test_idle_valve = "w\x00\x17\x00\x01"
[UserDefined]
dialog = tChargeSettings, "tChart Settings"
field = "MinRpm MinTps", tChargeMinRpmMinTps
field = "MinRpm MaxTps", tChargeMinRpmMaxTps
field = "MaxRpm MinTps", tChargeMaxRpmMinTps
field = "MaxRpm MaxTps", tChargeMaxRpmMaxTps
dialog = baseInjection, "Injection"
field = "Enabled", isInjectionEnabled

View File

@ -30,8 +30,7 @@ void testEngineMath(void) {
printf("*************************************************** testEngineMath\r\n");
EngineTestHelper eth(FORD_ESCORT_GT);
Engine * engine = &eth.engine;
engine_configuration_s *engineConfiguration = engine->engineConfiguration;
EXPAND_EngineTestHelper;
engineConfiguration->operationMode = FOUR_STROKE_CAM_SENSOR;
@ -39,14 +38,14 @@ void testEngineMath(void) {
assertEqualsM("6000 RPM", 5, getOneDegreeTimeMs(6000) * 180);
assertEquals(312.5, getTCharge(1000, 0, 300, 350));
assertEquals(313.5833, getTCharge(1000, 50, 300, 350));
assertEquals(314.6667, getTCharge(1000, 100, 300, 350));
assertEquals(312.5, getTCharge(1000, 0, 300, 350 PASS_ENGINE_PARAMETER));
assertEquals(313.5833, getTCharge(1000, 50, 300, 350 PASS_ENGINE_PARAMETER));
assertEquals(314.6667, getTCharge(1000, 100, 300, 350 PASS_ENGINE_PARAMETER));
assertEquals(312.5, getTCharge(4000, 0, 300, 350));
assertEquals(320.0833, getTCharge(4000, 50, 300, 350));
assertEquals(327.6667, getTCharge(4000, 100, 300, 350));
assertEquals(312.5, getTCharge(4000, 0, 300, 350 PASS_ENGINE_PARAMETER));
assertEquals(320.0833, getTCharge(4000, 50, 300, 350 PASS_ENGINE_PARAMETER));
assertEquals(327.6667, getTCharge(4000, 100, 300, 350 PASS_ENGINE_PARAMETER));
}
void testIgnitionMapGenerator(void) {