auto-sync
This commit is contained in:
parent
4c99dd35bc
commit
90ecd0e92b
|
@ -1,4 +1,4 @@
|
|||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Feb 05 14:17:22 EST 2016
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Feb 05 14:50:19 EST 2016
|
||||
// begin
|
||||
#ifndef ENGINE_CONFIGURATION_GENERATED_H_
|
||||
#define ENGINE_CONFIGURATION_GENERATED_H_
|
||||
|
@ -1330,7 +1330,7 @@ typedef struct {
|
|||
/**
|
||||
* offset 1900
|
||||
*/
|
||||
pid_s idlePid;
|
||||
pid_s idleRpmPid;
|
||||
/**
|
||||
* offset 1916
|
||||
*/
|
||||
|
@ -1470,7 +1470,11 @@ typedef struct {
|
|||
/**
|
||||
* offset 2248
|
||||
*/
|
||||
int unused[192];
|
||||
pid_s warmupAfrPid;
|
||||
/**
|
||||
* offset 2264
|
||||
*/
|
||||
int unused[188];
|
||||
/** total size 3016*/
|
||||
} engine_configuration_s;
|
||||
|
||||
|
@ -1620,4 +1624,4 @@ typedef struct {
|
|||
|
||||
#endif
|
||||
// end
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Feb 05 14:17:22 EST 2016
|
||||
// this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Feb 05 14:50:19 EST 2016
|
||||
|
|
|
@ -667,14 +667,14 @@
|
|||
#define mapErrorDetectionTooHigh_offset_hex 764
|
||||
#define step1RpmWindow_offset 1896
|
||||
#define step1RpmWindow_offset_hex 768
|
||||
#define idlePid_offset 1900
|
||||
#define idlePid_pFactor_offset 1900
|
||||
#define idlePid_iFactor_offset 1904
|
||||
#define idlePid_iFactor_offset_hex 770
|
||||
#define idlePid_dFactor_offset 1908
|
||||
#define idlePid_dFactor_offset_hex 774
|
||||
#define idlePid_offset_offset 1912
|
||||
#define idlePid_offset_offset_hex 778
|
||||
#define idleRpmPid_offset 1900
|
||||
#define idleRpmPid_pFactor_offset 1900
|
||||
#define idleRpmPid_iFactor_offset 1904
|
||||
#define idleRpmPid_iFactor_offset_hex 770
|
||||
#define idleRpmPid_dFactor_offset 1908
|
||||
#define idleRpmPid_dFactor_offset_hex 774
|
||||
#define idleRpmPid_offset_offset 1912
|
||||
#define idleRpmPid_offset_offset_hex 778
|
||||
#define idleDT_offset 1916
|
||||
#define idleControl_offset 1920
|
||||
#define idleControl_offset_hex 780
|
||||
|
@ -732,7 +732,12 @@
|
|||
#define tpsDecelEnleanmentMultiplier_offset 2236
|
||||
#define slowAdcAlpha_offset 2240
|
||||
#define debugMode_offset 2244
|
||||
#define unused_offset 2248
|
||||
#define warmupAfrPid_offset 2248
|
||||
#define warmupAfrPid_pFactor_offset 2248
|
||||
#define warmupAfrPid_iFactor_offset 2252
|
||||
#define warmupAfrPid_dFactor_offset 2256
|
||||
#define warmupAfrPid_offset_offset 2260
|
||||
#define unused_offset 2264
|
||||
#define le_formulas1_offset 3016
|
||||
#define le_formulas2_offset 3216
|
||||
#define le_formulas3_offset 3416
|
||||
|
|
|
@ -163,13 +163,21 @@ efitick_t getTimeNowNt(void) {
|
|||
return halTime.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* number of SysClock ticks in one ms
|
||||
*/
|
||||
#define TICKS_IN_MS (CH_FREQUENCY / 1000)
|
||||
|
||||
|
||||
// todo: this overflows pretty fast!
|
||||
efitimems_t currentTimeMillis(void) {
|
||||
// todo: migrate to getTimeNowUs? or not?
|
||||
return chTimeNow() / TICKS_IN_MS;
|
||||
}
|
||||
|
||||
// todo: this overflows pretty fast!
|
||||
int getTimeNowSeconds(void) {
|
||||
return chTimeNow() / CH_FREQUENCY;
|
||||
return currentTimeMillis() / 1000;
|
||||
}
|
||||
|
||||
#endif /* EFI_PROD_CODE */
|
||||
|
@ -195,16 +203,16 @@ static void periodicSlowCallback(Engine *engine);
|
|||
|
||||
static void scheduleNextSlowInvocation(void) {
|
||||
// schedule next invocation
|
||||
int period = boardConfiguration->generalPeriodicThreadPeriod;
|
||||
if (period == 0)
|
||||
period = 50; // this might happen while resetting config
|
||||
chVTSetAny(&periodicSlowTimer, period * TICKS_IN_MS, (vtfunc_t) &periodicSlowCallback, engine);
|
||||
int periodMs = boardConfiguration->generalPeriodicThreadPeriod;
|
||||
if (periodMs == 0)
|
||||
periodMs = 50; // this might happen while resetting configuration
|
||||
chVTSetAny(&periodicSlowTimer, MS2ST(periodMs), (vtfunc_t) &periodicSlowCallback, engine);
|
||||
}
|
||||
|
||||
static void periodicFastCallback(DECLARE_ENGINE_PARAMETER_F) {
|
||||
engine->periodicFastCallback();
|
||||
|
||||
chVTSetAny(&periodicFastTimer, 20 * TICKS_IN_MS, (vtfunc_t) &periodicFastCallback, engine);
|
||||
chVTSetAny(&periodicFastTimer, MS2ST(20), (vtfunc_t) &periodicFastCallback, engine);
|
||||
}
|
||||
|
||||
static void resetAccel(void) {
|
||||
|
|
|
@ -77,9 +77,9 @@ static void showIdleInfo(void) {
|
|||
hwPortname(boardConfiguration->idle.solenoidPin));
|
||||
}
|
||||
scheduleMsg(logger, "idleControl=%s", getIdle_control_e(engineConfiguration->idleControl));
|
||||
scheduleMsg(logger, "idle P=%f I=%f D=%f dT=%d", engineConfiguration->idlePid.pFactor,
|
||||
engineConfiguration->idlePid.iFactor,
|
||||
engineConfiguration->idlePid.dFactor,
|
||||
scheduleMsg(logger, "idle P=%f I=%f D=%f dT=%d", engineConfiguration->idleRpmPid.pFactor,
|
||||
engineConfiguration->idleRpmPid.iFactor,
|
||||
engineConfiguration->idleRpmPid.dFactor,
|
||||
engineConfiguration->idleDT);
|
||||
}
|
||||
|
||||
|
@ -219,19 +219,19 @@ static void apply(void) {
|
|||
}
|
||||
|
||||
static void setIdlePFactor(float value) {
|
||||
engineConfiguration->idlePid.pFactor = value;
|
||||
engineConfiguration->idleRpmPid.pFactor = value;
|
||||
apply();
|
||||
showIdleInfo();
|
||||
}
|
||||
|
||||
static void setIdleIFactor(float value) {
|
||||
engineConfiguration->idlePid.iFactor = value;
|
||||
engineConfiguration->idleRpmPid.iFactor = value;
|
||||
apply();
|
||||
showIdleInfo();
|
||||
}
|
||||
|
||||
static void setIdleDFactor(float value) {
|
||||
engineConfiguration->idlePid.dFactor = value;
|
||||
engineConfiguration->idleRpmPid.dFactor = value;
|
||||
apply();
|
||||
showIdleInfo();
|
||||
}
|
||||
|
@ -249,9 +249,9 @@ static void startIdleBench(void) {
|
|||
}
|
||||
|
||||
void setDefaultIdleParameters(void) {
|
||||
engineConfiguration->idlePid.pFactor = 0.1f;
|
||||
engineConfiguration->idlePid.iFactor = 0.05f;
|
||||
engineConfiguration->idlePid.dFactor = 0.0f;
|
||||
engineConfiguration->idleRpmPid.pFactor = 0.1f;
|
||||
engineConfiguration->idleRpmPid.iFactor = 0.05f;
|
||||
engineConfiguration->idleRpmPid.dFactor = 0.0f;
|
||||
engineConfiguration->idleDT = 10;
|
||||
}
|
||||
|
||||
|
@ -262,8 +262,9 @@ static void applyIdleSolenoidPinState(PwmConfig *state, int stateIndex) {
|
|||
int value = state->multiWave.waves[0].pinStates[stateIndex];
|
||||
if (!value /* always allow turning solenoid off */ ||
|
||||
(engine->rpmCalculator.rpmValue != 0 || timeToStopIdleTest != 0) /* do not run solenoid unless engine is spinning or bench testing in progress */
|
||||
)
|
||||
) {
|
||||
output->setValue(value);
|
||||
}
|
||||
}
|
||||
|
||||
static void initIdleHardware() {
|
||||
|
|
|
@ -594,7 +594,7 @@ baro_corr_table_t baroCorrTable;
|
|||
float mapErrorDetectionTooLow;kPa value which is too low to be true;"kPa", 1, 0, -100.0, 100.0, 2
|
||||
float mapErrorDetectionTooHigh;kPa value which is too high to be true;"kPa", 1, 0, -100.0, 800.0, 2
|
||||
int step1RpmWindow;RPMs prior to step1rpm point where ignition advance is retarded;"rpm", 1, 0, 0, 3000.0, 2
|
||||
pid_s idlePid;
|
||||
pid_s idleRpmPid;
|
||||
int idleDT;
|
||||
idle_control_e idleControl;
|
||||
brain_pin_e communicationPin;
|
||||
|
@ -635,7 +635,8 @@ baro_corr_table_t baroCorrTable;
|
|||
float tpsDecelEnleanmentMultiplier;;"coeff", 1, 0, 0, 200, 3
|
||||
float slowAdcAlpha;;"coeff", 1, 0, 0, 200, 3
|
||||
debug_mode_e debugMode;
|
||||
int[192] unused;
|
||||
pid_s warmupAfrPid;
|
||||
int[188] unused;
|
||||
|
||||
|
||||
end_struct
|
||||
|
|
|
@ -53,12 +53,6 @@ extern "C"
|
|||
*/
|
||||
#define NT2US(nt) ((nt) / US_TO_NT_MULTIPLIER)
|
||||
|
||||
|
||||
/**
|
||||
* number of SysClock ticks in one ms
|
||||
*/
|
||||
#define TICKS_IN_MS (CH_FREQUENCY / 1000)
|
||||
|
||||
#define Delay(ms) chThdSleepMilliseconds(ms)
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
|
@ -73,5 +67,4 @@ void unlockAnyContext(void);
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* MAIN_H_ */
|
||||
|
|
|
@ -41,7 +41,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 Fri Feb 05 14:17:22 EST 2016
|
||||
; this section was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Feb 05 14:50:19 EST 2016
|
||||
|
||||
pageSize = 16088
|
||||
page = 1
|
||||
|
@ -479,10 +479,10 @@ page = 1
|
|||
mapErrorDetectionTooLow = scalar, F32, 1888, "kPa", 1, 0, -100.0, 100.0, 2
|
||||
mapErrorDetectionTooHigh = scalar, F32, 1892, "kPa", 1, 0, -100.0, 800.0, 2
|
||||
step1RpmWindow = scalar, S32, 1896, "rpm", 1, 0, 0, 3000.0, 2
|
||||
idlePid_pFactor = scalar, F32, 1900, "value", 1, 0, 0, 1000, 2
|
||||
idlePid_iFactor = scalar, F32, 1904, "value", 1, 0, 0, 1000, 2
|
||||
idlePid_dFactor = scalar, F32, 1908, "value", 1, 0, 0, 1000, 2
|
||||
idlePid_offset = scalar, F32, 1912, "value", 1, 0, 0, 1000, 2
|
||||
idleRpmPid_pFactor = scalar, F32, 1900, "value", 1, 0, 0, 1000, 2
|
||||
idleRpmPid_iFactor = scalar, F32, 1904, "value", 1, 0, 0, 1000, 2
|
||||
idleRpmPid_dFactor = scalar, F32, 1908, "value", 1, 0, 0, 1000, 2
|
||||
idleRpmPid_offset = scalar, F32, 1912, "value", 1, 0, 0, 1000, 2
|
||||
;skipping idleDT offset 1916
|
||||
;skipping idleControl offset 1920
|
||||
communicationPin = bits, U32, 1924, [0:6], "PA0", "PA1", "PA2", "PA3", "PA4", "PA5", "PA6", "PA7", "PA8", "PA9", "PA10", "PA11", "PA12", "PA13", "PA14", "PA15", "PB0", "PB1", "PB2", "PB3", "PB4", "PB5", "PB6", "PB7", "PB8", "PB9", "PB10", "PB11", "PB12", "PB13", "PB14", "PB15", "PC0", "PC1", "PC2", "PC3", "PC4", "PC5", "PC6", "PC7", "PC8", "PC9", "PC10", "PC11", "PC12", "PC13", "PC14", "PC15", "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9", "PD10", "PD11", "PD12", "PD13", "PD14", "PD15", "PE0", "PE1", "PE2", "PE3", "PE4", "PE5", "PE6", "PE7", "PE8", "PE9", "PE10", "PE11", "PE12", "PE13", "PE14", "PE15", "NONE", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID", "INVALID"
|
||||
|
@ -522,7 +522,11 @@ page = 1
|
|||
tpsDecelEnleanmentMultiplier = scalar, F32, 2236, "coeff", 1, 0, 0, 200, 3
|
||||
slowAdcAlpha = scalar, F32, 2240, "coeff", 1, 0, 0, 200, 3
|
||||
debugMode = bits, U32, 2244, [0:1], "ALTERNATOR", "TPS_ACCEL", "mode2", "mode3"
|
||||
;skipping unused offset 2248
|
||||
warmupAfrPid_pFactor = scalar, F32, 2248, "value", 1, 0, 0, 1000, 2
|
||||
warmupAfrPid_iFactor = scalar, F32, 2252, "value", 1, 0, 0, 1000, 2
|
||||
warmupAfrPid_dFactor = scalar, F32, 2256, "value", 1, 0, 0, 1000, 2
|
||||
warmupAfrPid_offset = scalar, F32, 2260, "value", 1, 0, 0, 1000, 2
|
||||
;skipping unused offset 2264
|
||||
le_formulas1 = array, U08, 3016, [200],"char", 1, 0, 0.0, 3.0, 2
|
||||
le_formulas2 = array, U08, 3216, [200],"char", 1, 0, 0.0, 3.0, 2
|
||||
le_formulas3 = array, U08, 3416, [200],"char", 1, 0, 0.0, 3.0, 2
|
||||
|
@ -1387,11 +1391,19 @@ fileVersion = { 20160122 }
|
|||
field = "Off Above TPS", alternatorOffAboveTps
|
||||
field = "#PID control"
|
||||
field = "dTime", alternatorDT
|
||||
field = "offset", alternatorOffset
|
||||
field = "offset", alternatorControl_offset
|
||||
field = "P factor", alternatorControl_pFactor
|
||||
field = "I factor", alternatorControl_iFactor
|
||||
field = "D factor", alternatorControl_dFactor
|
||||
field = "#% duty = Pterm + Iterm + Dterm + offset%"
|
||||
|
||||
|
||||
field = "wa offset", warmupAfrPid_offset
|
||||
field = "wa P factor", warmupAfrPid_pFactor
|
||||
field = "wa I factor", warmupAfrPid_iFactor
|
||||
field = "wa D factor", warmupAfrPid_dFactor
|
||||
|
||||
|
||||
|
||||
dialog = energySystems, "Battery and Alternator Settings", yAxis
|
||||
panel = battery
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config;
|
||||
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Feb 05 14:17:22 EST 2016
|
||||
// this file was generated automatically by ConfigDefinition.jar based on rusefi_config.txt Fri Feb 05 14:50:19 EST 2016
|
||||
public class Fields {
|
||||
public static final int LE_COMMAND_LENGTH = 200;
|
||||
public static final int TS_FILE_VERSION = 20160122;
|
||||
|
@ -671,14 +671,14 @@ public class Fields {
|
|||
public static final int mapErrorDetectionTooHigh_offset_hex = 764;
|
||||
public static final int step1RpmWindow_offset = 1896;
|
||||
public static final int step1RpmWindow_offset_hex = 768;
|
||||
public static final int idlePid_offset = 1900;
|
||||
public static final int idlePid_pFactor_offset = 1900;
|
||||
public static final int idlePid_iFactor_offset = 1904;
|
||||
public static final int idlePid_iFactor_offset_hex = 770;
|
||||
public static final int idlePid_dFactor_offset = 1908;
|
||||
public static final int idlePid_dFactor_offset_hex = 774;
|
||||
public static final int idlePid_offset_offset = 1912;
|
||||
public static final int idlePid_offset_offset_hex = 778;
|
||||
public static final int idleRpmPid_offset = 1900;
|
||||
public static final int idleRpmPid_pFactor_offset = 1900;
|
||||
public static final int idleRpmPid_iFactor_offset = 1904;
|
||||
public static final int idleRpmPid_iFactor_offset_hex = 770;
|
||||
public static final int idleRpmPid_dFactor_offset = 1908;
|
||||
public static final int idleRpmPid_dFactor_offset_hex = 774;
|
||||
public static final int idleRpmPid_offset_offset = 1912;
|
||||
public static final int idleRpmPid_offset_offset_hex = 778;
|
||||
public static final int idleDT_offset = 1916;
|
||||
public static final int idleControl_offset = 1920;
|
||||
public static final int idleControl_offset_hex = 780;
|
||||
|
@ -736,7 +736,12 @@ public class Fields {
|
|||
public static final int tpsDecelEnleanmentMultiplier_offset = 2236;
|
||||
public static final int slowAdcAlpha_offset = 2240;
|
||||
public static final int debugMode_offset = 2244;
|
||||
public static final int unused_offset = 2248;
|
||||
public static final int warmupAfrPid_offset = 2248;
|
||||
public static final int warmupAfrPid_pFactor_offset = 2248;
|
||||
public static final int warmupAfrPid_iFactor_offset = 2252;
|
||||
public static final int warmupAfrPid_dFactor_offset = 2256;
|
||||
public static final int warmupAfrPid_offset_offset = 2260;
|
||||
public static final int unused_offset = 2264;
|
||||
public static final int le_formulas1_offset = 3016;
|
||||
public static final int le_formulas2_offset = 3216;
|
||||
public static final int le_formulas3_offset = 3416;
|
||||
|
@ -1226,10 +1231,10 @@ public class Fields {
|
|||
public static final Field MAPERRORDETECTIONTOOLOW = Field.create("MAPERRORDETECTIONTOOLOW", 1888, FieldType.FLOAT);
|
||||
public static final Field MAPERRORDETECTIONTOOHIGH = Field.create("MAPERRORDETECTIONTOOHIGH", 1892, FieldType.FLOAT);
|
||||
public static final Field STEP1RPMWINDOW = Field.create("STEP1RPMWINDOW", 1896, FieldType.INT);
|
||||
public static final Field IDLEPID_PFACTOR = Field.create("IDLEPID_PFACTOR", 1900, FieldType.FLOAT);
|
||||
public static final Field IDLEPID_IFACTOR = Field.create("IDLEPID_IFACTOR", 1904, FieldType.FLOAT);
|
||||
public static final Field IDLEPID_DFACTOR = Field.create("IDLEPID_DFACTOR", 1908, FieldType.FLOAT);
|
||||
public static final Field IDLEPID_OFFSET = Field.create("IDLEPID_OFFSET", 1912, FieldType.FLOAT);
|
||||
public static final Field IDLERPMPID_PFACTOR = Field.create("IDLERPMPID_PFACTOR", 1900, FieldType.FLOAT);
|
||||
public static final Field IDLERPMPID_IFACTOR = Field.create("IDLERPMPID_IFACTOR", 1904, FieldType.FLOAT);
|
||||
public static final Field IDLERPMPID_DFACTOR = Field.create("IDLERPMPID_DFACTOR", 1908, FieldType.FLOAT);
|
||||
public static final Field IDLERPMPID_OFFSET = Field.create("IDLERPMPID_OFFSET", 1912, FieldType.FLOAT);
|
||||
public static final Field IDLEDT = Field.create("IDLEDT", 1916, FieldType.INT);
|
||||
public static final Field IDLECONTROL = Field.create("IDLECONTROL", 1920, FieldType.INT);
|
||||
public static final Field COMMUNICATIONPIN = Field.create("COMMUNICATIONPIN", 1924, FieldType.INT, brain_pin_e);
|
||||
|
@ -1266,6 +1271,10 @@ public class Fields {
|
|||
public static final Field SLOWADCALPHA = Field.create("SLOWADCALPHA", 2240, FieldType.FLOAT);
|
||||
public static final String[] debug_mode_e = {"ALTERNATOR", "TPS_ACCEL", "mode2", "mode3"};
|
||||
public static final Field DEBUGMODE = Field.create("DEBUGMODE", 2244, FieldType.INT, debug_mode_e);
|
||||
public static final Field WARMUPAFRPID_PFACTOR = Field.create("WARMUPAFRPID_PFACTOR", 2248, FieldType.FLOAT);
|
||||
public static final Field WARMUPAFRPID_IFACTOR = Field.create("WARMUPAFRPID_IFACTOR", 2252, FieldType.FLOAT);
|
||||
public static final Field WARMUPAFRPID_DFACTOR = Field.create("WARMUPAFRPID_DFACTOR", 2256, FieldType.FLOAT);
|
||||
public static final Field WARMUPAFRPID_OFFSET = Field.create("WARMUPAFRPID_OFFSET", 2260, FieldType.FLOAT);
|
||||
public static final Field LE_FORMULAS1 = Field.create("LE_FORMULAS1", 3016, FieldType.INT);
|
||||
public static final Field LE_FORMULAS2 = Field.create("LE_FORMULAS2", 3216, FieldType.INT);
|
||||
public static final Field LE_FORMULAS3 = Field.create("LE_FORMULAS3", 3416, FieldType.INT);
|
||||
|
|
|
@ -32,7 +32,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
* @see EngineSnifferPanel
|
||||
*/
|
||||
public class Launcher {
|
||||
public static final int CONSOLE_VERSION = 20160124;
|
||||
public static final int CONSOLE_VERSION = 20160205;
|
||||
public static final boolean SHOW_STIMULATOR = false;
|
||||
private static final String TAB_INDEX = "main_tab";
|
||||
protected static final String PORT_KEY = "port";
|
||||
|
|
Loading…
Reference in New Issue