auto-sync
This commit is contained in:
parent
68ecc5c5be
commit
fec6df3280
|
@ -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;
|
||||
|
|
|
@ -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