auto-sync

This commit is contained in:
rusEfi 2016-06-26 21:02:40 -04:00
parent fed54e5ebe
commit 18d9a8bf37
6 changed files with 38 additions and 22 deletions

View File

@ -1,4 +1,4 @@
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 26 12:22:01 EDT 2016
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 26 20:48:53 EDT 2016
// begin
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
#define ENGINE_CONFIGURATION_GENERATED_H_
@ -1636,9 +1636,14 @@ typedef struct {
*/
pid_s auxPid1;
/**
* Extra idle while cranking
* offset 2428
*/
int unused[155];
float crankingIdleAdjustment;
/**
* offset 2432
*/
int unused[154];
/** total size 3048*/
} engine_configuration_s;
@ -1827,4 +1832,4 @@ typedef struct {
#endif
// end
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 26 12:22:01 EDT 2016
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 26 20:48:53 EDT 2016

View File

@ -836,7 +836,9 @@
#define auxPid1_dFactor_offset_hex 974
#define auxPid1_offset_offset 2424
#define auxPid1_offset_offset_hex 978
#define unused_offset 2428
#define crankingIdleAdjustment_offset 2428
#define unused_offset 2432
#define unused_offset_hex 980
#define le_formulas1_offset 3048
#define le_formulas2_offset 3248
#define le_formulas3_offset 3448

View File

@ -172,6 +172,20 @@ percent_t getIdlePosition(void) {
}
}
static void autoIdle() {
efitimems_t now = currentTimeMillis();
percent_t newValue = idlePositionController.getIdle(getRpmE(engine), now PASS_ENGINE_PARAMETER);
if (currentIdleValve != newValue) {
currentIdleValve = newValue;
// todo: looks like in auto mode stepper value is not set, only solenoid?
setIdleValvePwm(newValue);
}
}
static msg_t ivThread(int param) {
(void) param;
chRegSetThreadName("IdleValve");
@ -192,23 +206,13 @@ static msg_t ivThread(int param) {
finishIdleTestIfNeeded();
undoIdleBlipIfNeeded();
if (engineConfiguration->idleMode != IM_AUTO) {
if (engineConfiguration->idleMode == IM_MANUAL) {
// let's re-apply CLT correction
manualIdleController(boardConfiguration->manIdlePosition);
continue;
} else {
autoIdle();
}
efitimems_t now = currentTimeMillis();
percent_t newValue = idlePositionController.getIdle(getRpmE(engine), now PASS_ENGINE_PARAMETER);
if (currentIdleValve != newValue) {
currentIdleValve = newValue;
// todo: looks like in auto mode stepper value is not set, only solenoid?
setIdleValvePwm(newValue);
}
}
#if defined __GNUC__
return -1;

View File

@ -699,7 +699,8 @@ float[MAP_ACCEL_TAPER] mapAccelTaperMult;;"mult", 1, 0, 0.0, 300,
float egoValueShift;EGO value correction;"value", 1, 0, -10.0, 10, 2
int auxPid1DT;Aux Pid #1 dTime;"ms", 1, 0, 0, 3000, 0
pid_s auxPid1;
int[155] unused;
float crankingIdleAdjustment;Extra idle while cranking;"value", 1, 0, -100.0, 100,
int[154] unused;
end_struct

View File

@ -42,7 +42,7 @@ enable2ndByteCanID = false
; see PAGE_0_SIZE in C source code
; CONFIG_DEFINITION_START
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 26 12:22:01 EDT 2016
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 26 20:48:53 EDT 2016
pageSize = 17080
page = 1
@ -578,7 +578,8 @@ page = 1
auxPid1_iFactor = scalar, F32, 2416, "value", 1, 0, 0, 1000, 5
auxPid1_dFactor = scalar, F32, 2420, "value", 1, 0, 0, 1000, 5
auxPid1_offset = scalar, F32, 2424, "value", 1, 0, 0, 1000, 3
;skipping unused offset 2428
crankingIdleAdjustment = scalar, F32, 2428, "value", 1, 0, -100.0, 100,
;skipping unused offset 2432
le_formulas1 = array, U08, 3048, [200],"char", 1, 0, 0.0, 3.0, 2
le_formulas2 = array, U08, 3248, [200],"char", 1, 0, 0.0, 3.0, 2
le_formulas3 = array, U08, 3448, [200],"char", 1, 0, 0.0, 3.0, 2

View File

@ -1,6 +1,6 @@
package com.rusefi.config;
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 26 12:22:01 EDT 2016
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Sun Jun 26 20:48:53 EDT 2016
public class Fields {
public static final int LE_COMMAND_LENGTH = 200;
public static final int FSIO_ADC_COUNT = 4;
@ -840,7 +840,9 @@ public class Fields {
public static final int auxPid1_dFactor_offset_hex = 974;
public static final int auxPid1_offset_offset = 2424;
public static final int auxPid1_offset_offset_hex = 978;
public static final int unused_offset = 2428;
public static final int crankingIdleAdjustment_offset = 2428;
public static final int unused_offset = 2432;
public static final int unused_offset_hex = 980;
public static final int le_formulas1_offset = 3048;
public static final int le_formulas2_offset = 3248;
public static final int le_formulas3_offset = 3448;
@ -1435,6 +1437,7 @@ public class Fields {
public static final Field AUXPID1_IFACTOR = Field.create("AUXPID1_IFACTOR", 2416, FieldType.FLOAT);
public static final Field AUXPID1_DFACTOR = Field.create("AUXPID1_DFACTOR", 2420, FieldType.FLOAT);
public static final Field AUXPID1_OFFSET = Field.create("AUXPID1_OFFSET", 2424, FieldType.FLOAT);
public static final Field CRANKINGIDLEADJUSTMENT = Field.create("CRANKINGIDLEADJUSTMENT", 2428, FieldType.FLOAT);
public static final Field LE_FORMULAS1 = Field.create("LE_FORMULAS1", 3048, FieldType.INT);
public static final Field LE_FORMULAS2 = Field.create("LE_FORMULAS2", 3248, FieldType.INT);
public static final Field LE_FORMULAS3 = Field.create("LE_FORMULAS3", 3448, FieldType.INT);