auto-sync
This commit is contained in:
parent
59ba9b974e
commit
521940b184
|
@ -124,7 +124,7 @@ void setBmwE34(DECLARE_ENGINE_PARAMETER_F) {
|
|||
boardConfiguration->idle.solenoidPin = GPIOC_14;
|
||||
boardConfiguration->idle.solenoidPinMode = OM_INVERTED;
|
||||
boardConfiguration->idle.solenoidFrequency = 300;
|
||||
boardConfiguration->idlePosition = 50; // set_idle_pwm 50
|
||||
boardConfiguration->manIdlePosition = 50; // set_idle_pwm 50
|
||||
|
||||
// disable sd_card
|
||||
boardConfiguration->sdCardCsPin = GPIO_UNASSIGNED;
|
||||
|
|
|
@ -100,7 +100,8 @@ typedef struct {
|
|||
float wallFuelAmount;
|
||||
float totalFuelCorrection;
|
||||
floatms_t wallFuelCorrection;
|
||||
int unused3[6];
|
||||
float idlePosition;
|
||||
int unused3[5];
|
||||
} TunerStudioOutputChannels;
|
||||
|
||||
#endif /* TUNERSTUDIO_CONFIGURATION_H_ */
|
||||
|
|
|
@ -603,6 +603,8 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
|||
tsOutputChannels->wallFuelAmount = wallFuel.getWallFuel(0);
|
||||
tsOutputChannels->totalFuelCorrection = engine->totalFuelCorrection;
|
||||
tsOutputChannels->wallFuelCorrection = engine->wallFuelCorrection;
|
||||
tsOutputChannels->idlePosition = getIdlePosition();
|
||||
|
||||
|
||||
tsOutputChannels->checkEngine = hasErrorCodes();
|
||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||
|
|
|
@ -468,7 +468,7 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
|
||||
boardConfiguration->idle.solenoidFrequency = 200;
|
||||
// set_idle_position 50
|
||||
boardConfiguration->idlePosition = 50;
|
||||
boardConfiguration->manIdlePosition = 50;
|
||||
engineConfiguration->targetIdleRpm = 1200;
|
||||
// engineConfiguration->idleMode = IM_AUTO;
|
||||
engineConfiguration->idleMode = IM_MANUAL;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// this section was generated by config_definition.jar on Mon Oct 05 19:28:15 EDT 2015
|
||||
// this section was generated by config_definition.jar on Sun Oct 18 13:04:59 EDT 2015
|
||||
// begin
|
||||
#include "rusefi_types.h"
|
||||
typedef struct {
|
||||
|
@ -286,7 +286,7 @@ typedef struct {
|
|||
* value between 0 and 100 used in Manual mode
|
||||
* offset 20
|
||||
*/
|
||||
float idlePosition;
|
||||
float manIdlePosition;
|
||||
/**
|
||||
* offset 24
|
||||
*/
|
||||
|
@ -1517,4 +1517,4 @@ typedef struct {
|
|||
} persistent_config_s;
|
||||
|
||||
// end
|
||||
// this section was generated by config_definition.jar on Mon Oct 05 19:28:15 EDT 2015
|
||||
// this section was generated by config_definition.jar on Sun Oct 18 13:04:59 EDT 2015
|
||||
|
|
|
@ -221,8 +221,8 @@
|
|||
#define idle_stepperDirectionPin_offset 636
|
||||
#define idle_stepperStepPin_offset 640
|
||||
#define idle_stepperStepPin_offset_hex 280
|
||||
#define idlePosition_offset 644
|
||||
#define idlePosition_offset_hex 284
|
||||
#define manIdlePosition_offset 644
|
||||
#define manIdlePosition_offset_hex 284
|
||||
#define fuelPumpPin_offset 648
|
||||
#define fuelPumpPin_offset_hex 288
|
||||
#define fuelPumpPinMode_offset 652
|
||||
|
|
|
@ -62,7 +62,7 @@ void idleDebug(const char *msg, percent_t value) {
|
|||
|
||||
static void showIdleInfo(void) {
|
||||
scheduleMsg(logger, "idleMode=%s position=%f isStepper=%s", getIdle_mode_e(engineConfiguration->idleMode),
|
||||
boardConfiguration->idlePosition, boolToString(boardConfiguration->useStepperIdle));
|
||||
getIdlePosition(), boolToString(boardConfiguration->useStepperIdle));
|
||||
if (boardConfiguration->useStepperIdle) {
|
||||
scheduleMsg(logger, "direction=%s reactionTime=%f", hwPortname(boardConfiguration->idle.stepperDirectionPin),
|
||||
engineConfiguration->idleStepperReactionTime);
|
||||
|
@ -89,7 +89,8 @@ static void setIdleValvePwm(percent_t value) {
|
|||
}
|
||||
|
||||
static void doSetIdleValvePosition(int positionPercent) {
|
||||
boardConfiguration->idlePosition = positionPercent;
|
||||
// todo: this is not great that we have to write into configuration here
|
||||
boardConfiguration->manIdlePosition = positionPercent;
|
||||
|
||||
percent_t cltCorrectedPosition = interpolate2d(engine->engineState.clt, config->cltIdleCorrBins, config->cltIdleCorr,
|
||||
CLT_CURVE_SIZE) * positionPercent;
|
||||
|
@ -128,7 +129,7 @@ static void blipIdle(int idlePosition, int durationMs) {
|
|||
if (timeToStopBlip != 0) {
|
||||
return; // already in idle blip
|
||||
}
|
||||
idlePositionBeforeBlip = boardConfiguration->idlePosition;
|
||||
idlePositionBeforeBlip = boardConfiguration->manIdlePosition;
|
||||
setIdleValvePosition(idlePosition);
|
||||
timeToStopBlip = getTimeNowUs() + 1000 * durationMs;
|
||||
}
|
||||
|
@ -140,11 +141,20 @@ static void undoIdleBlipIfNeeded() {
|
|||
}
|
||||
}
|
||||
|
||||
static percent_t currentIdleValve = -1;
|
||||
|
||||
percent_t getIdlePosition(void) {
|
||||
if (engineConfiguration->idleMode == IM_AUTO) {
|
||||
return currentIdleValve;
|
||||
} else {
|
||||
return boardConfiguration->manIdlePosition;
|
||||
}
|
||||
}
|
||||
|
||||
static msg_t ivThread(int param) {
|
||||
(void) param;
|
||||
chRegSetThreadName("IdleValve");
|
||||
|
||||
percent_t currentIdleValve = -1;
|
||||
while (true) {
|
||||
chThdSleepMilliseconds(boardConfiguration->idleThreadPeriod);
|
||||
|
||||
|
@ -162,7 +172,7 @@ static msg_t ivThread(int param) {
|
|||
|
||||
if (engineConfiguration->idleMode != IM_AUTO) {
|
||||
// let's re-apply CLT correction
|
||||
doSetIdleValvePosition(boardConfiguration->idlePosition);
|
||||
doSetIdleValvePosition(boardConfiguration->manIdlePosition);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -173,6 +183,8 @@ static msg_t ivThread(int param) {
|
|||
if (currentIdleValve != newValue) {
|
||||
currentIdleValve = newValue;
|
||||
|
||||
// todo: looks like in auto mode stepper value is not set, only solenoid?
|
||||
|
||||
setIdleValvePwm(newValue);
|
||||
}
|
||||
}
|
||||
|
@ -207,7 +219,7 @@ void startIdleThread(Logging*sharedLogger, Engine *engine) {
|
|||
* Start PWM for idleValvePin
|
||||
*/
|
||||
startSimplePwmExt(&idleSolenoid, "Idle Valve", boardConfiguration->idle.solenoidPin, &idleSolenoidPin,
|
||||
boardConfiguration->idle.solenoidFrequency, boardConfiguration->idlePosition / 100,
|
||||
boardConfiguration->idle.solenoidFrequency, boardConfiguration->manIdlePosition / 100,
|
||||
applyIdleSolenoidPinState);
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "engine.h"
|
||||
|
||||
percent_t getIdlePosition(void);
|
||||
void startIdleThread(Logging*sharedLogger, Engine *engine);
|
||||
|
||||
#endif /* IDLE_THREAD_H_ */
|
||||
|
|
|
@ -314,7 +314,7 @@ struct_no_prefix board_configuration_s
|
|||
idle_hardware_s idle;
|
||||
|
||||
|
||||
float idlePosition;value between 0 and 100 used in Manual mode;"%", 1, 0, 0, 100, 0
|
||||
float manIdlePosition;value between 0 and 100 used in Manual mode;"%", 1, 0, 0, 100, 0
|
||||
|
||||
brain_pin_e fuelPumpPin;
|
||||
pin_output_mode_e fuelPumpPinMode;
|
||||
|
|
|
@ -40,7 +40,7 @@ enable2ndByteCanID = false
|
|||
|
||||
; see PAGE_0_SIZE in C source code
|
||||
; CONFIG_DEFINITION_START
|
||||
; this section was generated by ConfigDefinition.jar on Mon Oct 12 18:03:28 EDT 2015
|
||||
; this section was generated by ConfigDefinition.jar on Sun Oct 18 13:05:04 EDT 2015
|
||||
|
||||
pageSize = 15288
|
||||
page = 1
|
||||
|
@ -155,7 +155,7 @@ page = 1
|
|||
idle_solenoidFrequency = scalar, S32, 632, "Hz", 1, 0, 0, 3000, 0
|
||||
idle_stepperDirectionPin = bits, U32, 636, [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"
|
||||
idle_stepperStepPin = bits, U32, 640, [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"
|
||||
idlePosition = scalar, F32, 644, "%", 1, 0, 0, 100, 0
|
||||
manIdlePosition = scalar, F32, 644, "%", 1, 0, 0, 100, 0
|
||||
fuelPumpPin = bits, U32, 648, [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"
|
||||
fuelPumpPinMode = bits, U32, 652, [0:1], "default", "default inverted", "open", "open inverted"
|
||||
injectionPins1 = bits, U32, 656, [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"
|
||||
|
@ -675,6 +675,7 @@ fileVersion = { 20150625 }
|
|||
wallFuelAmount = scalar, F32, 160, "ms", 1, 0
|
||||
tempFuelCorrection = scalar, F32, 164, "%", 1, 0
|
||||
wallFuelCorrection = scalar, F32, 168, "ms", 1, 0
|
||||
curIdlePosition = scalar, F32, 172, "percent", 1, 0
|
||||
egoCorrection = { 100 }
|
||||
time = { timeNow }
|
||||
; engineLoad = { algorithm == 0 ? MAF : TPS }
|
||||
|
@ -895,6 +896,7 @@ fileVersion = { 20150625 }
|
|||
wallFuelAmountGauge = wallFuelAmount, "wall fuel", "ms", 0, 100, 0, 0, 100, 100, 0, 0
|
||||
tempFuelCorrectionGauge = tempFuelCorrection, "temp fuel corr", "mult", 0, 10, 0, 0, 10, 10, 0, 0
|
||||
wallFuelCorrectionGauge = wallFuelCorrection, "extra fuel", "ms", 0, 100, 0, 0, 100, 100, 0, 0
|
||||
curIdlePositionGauge = curIdlePosition, "idle position", "%", 0, 100, 0, 0, 100, 100, 0, 0
|
||||
|
||||
[FrontPage]
|
||||
; Gauges are numbered left to right, top to bottom.
|
||||
|
@ -1248,7 +1250,7 @@ fileVersion = { 20150625 }
|
|||
dialog = idleSettings, "", yAxis
|
||||
field = "Manual mode", idleMode
|
||||
field = "Auto target", targetIdleRpm, { idleMode == 0}
|
||||
slider = "Manual Idle Position", idlePosition, horizontal
|
||||
slider = "Manual Idle Position", manIdlePosition, horizontal
|
||||
field = ""
|
||||
field = "use stepper", useStepperIdle
|
||||
panel = idleType
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.rusefi.config;
|
||||
|
||||
// this file was generated automatically by ConfigDefinition.jar Mon Oct 12 18:03:28 EDT 2015
|
||||
// this file was generated automatically by ConfigDefinition.jar Sun Oct 18 13:05:04 EDT 2015
|
||||
public class Fields {
|
||||
public static final Field ENGINETYPE = new Field("ENGINETYPE", 0, FieldType.INT);
|
||||
public static final Field HEADERMAGICVALUE = new Field("HEADERMAGICVALUE", 4, FieldType.INT);
|
||||
|
@ -109,7 +109,7 @@ public class Fields {
|
|||
public static final Field IDLE_SOLENOIDFREQUENCY = new Field("IDLE_SOLENOIDFREQUENCY", 632, FieldType.INT);
|
||||
public static final Field IDLE_STEPPERDIRECTIONPIN = new Field("IDLE_STEPPERDIRECTIONPIN", 636, FieldType.INT, brain_pin_e);
|
||||
public static final Field IDLE_STEPPERSTEPPIN = new Field("IDLE_STEPPERSTEPPIN", 640, FieldType.INT, brain_pin_e);
|
||||
public static final Field IDLEPOSITION = new Field("IDLEPOSITION", 644, FieldType.FLOAT);
|
||||
public static final Field MANIDLEPOSITION = new Field("MANIDLEPOSITION", 644, FieldType.FLOAT);
|
||||
public static final Field FUELPUMPPIN = new Field("FUELPUMPPIN", 648, FieldType.INT, brain_pin_e);
|
||||
public static final Field FUELPUMPPINMODE = new Field("FUELPUMPPINMODE", 652, FieldType.INT, pin_output_mode_e);
|
||||
public static final Field INJECTIONPINS1 = new Field("INJECTIONPINS1", 656, FieldType.INT, brain_pin_e);
|
||||
|
|
|
@ -95,6 +95,7 @@ public enum Sensor {
|
|||
WALL_FUEL(SensorCategory.OPERATIONS, FieldType.FLOAT, 160, BackgroundColor.MUD),
|
||||
temperatureFuelCorrection(SensorCategory.OPERATIONS, FieldType.FLOAT, 164, BackgroundColor.MUD, 0, 5),
|
||||
wallFuelCorrection(SensorCategory.OPERATIONS, FieldType.FLOAT, 168, BackgroundColor.MUD),
|
||||
idlePosition(SensorCategory.OPERATIONS, FieldType.FLOAT, 172, BackgroundColor.MUD),
|
||||
|
||||
INJ_1_2_DELTA("inj 1-2 delta", SensorCategory.SNIFFING),
|
||||
INJ_3_4_DELTA("inj 3-4 delta", SensorCategory.SNIFFING),
|
||||
|
|
|
@ -32,7 +32,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
* @see com.rusefi.StartupFrame
|
||||
*/
|
||||
public class Launcher {
|
||||
public static final int CONSOLE_VERSION = 20151012;
|
||||
public static final int CONSOLE_VERSION = 20151018;
|
||||
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