auto-sync
This commit is contained in:
parent
f077b9f09c
commit
25534dd6c0
|
@ -404,7 +404,7 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
boardConfiguration->idle.stepperDirectionPin = GPIOE_10;
|
boardConfiguration->idle.stepperDirectionPin = GPIOE_10;
|
||||||
boardConfiguration->idle.stepperStepPin = GPIOE_12;
|
boardConfiguration->idle.stepperStepPin = GPIOE_12;
|
||||||
|
|
||||||
engineConfiguration->accelLength = 12;
|
engineConfiguration->mapAccelLength = 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* EFI_SUPPORT_DODGE_NEON */
|
#endif /* EFI_SUPPORT_DODGE_NEON */
|
||||||
|
|
|
@ -10,11 +10,15 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "gm_2_2.h"
|
#include "gm_2_2.h"
|
||||||
|
|
||||||
EXTERN_ENGINE;
|
EXTERN_ENGINE
|
||||||
|
;
|
||||||
|
|
||||||
void setGm2_2(DECLARE_ENGINE_PARAMETER_F) {
|
void setGm2_2(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
board_configuration_s * boardConfiguration = &engineConfiguration->bc;
|
board_configuration_s * boardConfiguration = &engineConfiguration->bc;
|
||||||
|
|
||||||
|
setOperationMode(engineConfiguration, FOUR_STROKE_CAM_SENSOR);
|
||||||
|
engineConfiguration->trigger.type = TT_ONE_PLUS_TOOTHED_WHEEL_60_2;
|
||||||
|
|
||||||
boardConfiguration->triggerInputPins[0] = GPIOC_6;
|
boardConfiguration->triggerInputPins[0] = GPIOC_6;
|
||||||
boardConfiguration->triggerInputPins[1] = GPIOA_8;
|
boardConfiguration->triggerInputPins[1] = GPIOA_8;
|
||||||
|
|
||||||
|
|
|
@ -91,8 +91,9 @@ typedef struct {
|
||||||
float veValue;
|
float veValue;
|
||||||
float maxDelta;
|
float maxDelta;
|
||||||
float minDelta;
|
float minDelta;
|
||||||
float currentAccelDelta;
|
float currentMapAccelDelta;
|
||||||
int unused3[17];
|
float tpsAccelFuel;
|
||||||
|
int unused3[16];
|
||||||
} TunerStudioOutputChannels;
|
} TunerStudioOutputChannels;
|
||||||
|
|
||||||
#endif /* TUNERSTUDIO_CONFIGURATION_H_ */
|
#endif /* TUNERSTUDIO_CONFIGURATION_H_ */
|
||||||
|
|
|
@ -558,7 +558,7 @@ void updateTunerStudioState(TunerStudioOutputChannels *tsOutputChannels DECLARE_
|
||||||
tsOutputChannels->rpmAcceleration = engine->rpmCalculator.getRpmAcceleration();
|
tsOutputChannels->rpmAcceleration = engine->rpmCalculator.getRpmAcceleration();
|
||||||
tsOutputChannels->maxDelta = engine->accelEnrichment.maxDelta;
|
tsOutputChannels->maxDelta = engine->accelEnrichment.maxDelta;
|
||||||
tsOutputChannels->minDelta = engine->accelEnrichment.minDelta;
|
tsOutputChannels->minDelta = engine->accelEnrichment.minDelta;
|
||||||
tsOutputChannels->currentAccelDelta = engine->accelEnrichment.getEnrichment(PASS_ENGINE_PARAMETER_F) * 100 / getMap();
|
tsOutputChannels->currentMapAccelDelta = engine->accelEnrichment.getEnrichment(PASS_ENGINE_PARAMETER_F) * 100 / getMap();
|
||||||
|
|
||||||
tsOutputChannels->checkEngine = hasErrorCodes();
|
tsOutputChannels->checkEngine = hasErrorCodes();
|
||||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||||
|
|
|
@ -21,7 +21,8 @@ EXTERN_ENGINE
|
||||||
//static THD_WORKING_AREA(aeThreadStack, UTILITY_THREAD_STACK_SIZE);
|
//static THD_WORKING_AREA(aeThreadStack, UTILITY_THREAD_STACK_SIZE);
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
static AccelEnrichmemnt instance;
|
static AccelEnrichmemnt mapInstance;
|
||||||
|
static AccelEnrichmemnt tpsInstance;
|
||||||
static Logging *logger;
|
static Logging *logger;
|
||||||
|
|
||||||
void AccelEnrichmemnt::updateDiffEnrichment(engine_configuration_s *engineConfiguration, float engineLoad) {
|
void AccelEnrichmemnt::updateDiffEnrichment(engine_configuration_s *engineConfiguration, float engineLoad) {
|
||||||
|
@ -40,8 +41,8 @@ void AccelEnrichmemnt::updateDiffEnrichment(engine_configuration_s *engineConfig
|
||||||
|
|
||||||
float AccelEnrichmemnt::getEnrichment(DECLARE_ENGINE_PARAMETER_F) {
|
float AccelEnrichmemnt::getEnrichment(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
float d = cb.maxValue(cb.getSize());
|
float d = cb.maxValue(cb.getSize());
|
||||||
if (d > engineConfiguration->accelEnrichmentThreshold) {
|
if (d > engineConfiguration->mapAccelEnrichmentThreshold) {
|
||||||
return d * engineConfiguration->accelEnrichmentMultiplier;
|
return d * engineConfiguration->mapAccelEnrichmentMultiplier;
|
||||||
}
|
}
|
||||||
// if (d < engineConfiguration->deaccelEnrichmentThreshold) {
|
// if (d < engineConfiguration->deaccelEnrichmentThreshold) {
|
||||||
// return d * engineConfiguration->deaccelEnrichmentMultiplier;
|
// return d * engineConfiguration->deaccelEnrichmentMultiplier;
|
||||||
|
@ -104,18 +105,31 @@ AccelEnrichmemnt::AccelEnrichmemnt() {
|
||||||
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
|
#if ! EFI_UNIT_TEST || defined(__DOXYGEN__)
|
||||||
|
|
||||||
static void accelInfo() {
|
static void accelInfo() {
|
||||||
scheduleMsg(logger, "accel length=%d", instance.cb.getSize());
|
scheduleMsg(logger, "MAP accel length=%d", mapInstance.cb.getSize());
|
||||||
scheduleMsg(logger, "accel th=%f/mult=%f", engineConfiguration->accelEnrichmentThreshold, engineConfiguration->accelEnrichmentMultiplier);
|
scheduleMsg(logger, "MAP accel th=%f/mult=%f", engineConfiguration->mapAccelEnrichmentThreshold, engineConfiguration->mapAccelEnrichmentMultiplier);
|
||||||
scheduleMsg(logger, "decel th=%f/mult=%f", engineConfiguration->decelEnrichmentThreshold, engineConfiguration->decelEnrichmentMultiplier);
|
scheduleMsg(logger, "MAP decel th=%f/mult=%f", engineConfiguration->decelEnrichmentThreshold, engineConfiguration->decelEnrichmentMultiplier);
|
||||||
|
|
||||||
|
scheduleMsg(logger, "TPS accel length=%d", tpsInstance.cb.getSize());
|
||||||
|
scheduleMsg(logger, "TPS accel th=%f/mult=%f", engineConfiguration->tpsAccelEnrichmentThreshold, engineConfiguration->tpsAccelEnrichmentMultiplier);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setAccelThr(float value) {
|
static void setMapAccelThr(float value) {
|
||||||
engineConfiguration->accelEnrichmentThreshold = value;
|
engineConfiguration->mapAccelEnrichmentThreshold = value;
|
||||||
accelInfo();
|
accelInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setAccelMult(float value) {
|
static void setMapAccelMult(float value) {
|
||||||
engineConfiguration->accelEnrichmentMultiplier = value;
|
engineConfiguration->mapAccelEnrichmentMultiplier = value;
|
||||||
|
accelInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void setTpsAccelThr(float value) {
|
||||||
|
engineConfiguration->tpsAccelEnrichmentThreshold = value;
|
||||||
|
accelInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void setTpsAccelMult(float value) {
|
||||||
|
engineConfiguration->tpsAccelEnrichmentMultiplier = value;
|
||||||
accelInfo();
|
accelInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,20 +143,30 @@ static void setDecelMult(float value) {
|
||||||
accelInfo();
|
accelInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setAccelLen(int len) {
|
static void setTpsAccelLen(int len) {
|
||||||
instance.cb.setSize(len);
|
tpsInstance.cb.setSize(len);
|
||||||
|
accelInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void setMapAccelLen(int len) {
|
||||||
|
mapInstance.cb.setSize(len);
|
||||||
accelInfo();
|
accelInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
void initAccelEnrichment(Logging *sharedLogger) {
|
void initAccelEnrichment(Logging *sharedLogger) {
|
||||||
logger = sharedLogger;
|
logger = sharedLogger;
|
||||||
addConsoleActionF("set_accel_threshold", setAccelThr);
|
addConsoleActionI("set_tps_accel_len", setTpsAccelLen);
|
||||||
addConsoleActionF("set_accel_multiplier", setAccelMult);
|
addConsoleActionF("set_tps_accel_threshold", setTpsAccelThr);
|
||||||
|
addConsoleActionF("set_tps_ccel_multiplier", setTpsAccelMult);
|
||||||
|
|
||||||
|
addConsoleActionI("set_map_accel_len", setMapAccelLen);
|
||||||
|
addConsoleActionF("set_map_accel_threshold", setMapAccelThr);
|
||||||
|
addConsoleActionF("set_map_ccel_multiplier", setMapAccelMult);
|
||||||
addConsoleActionF("set_decel_threshold", setDecelThr);
|
addConsoleActionF("set_decel_threshold", setDecelThr);
|
||||||
addConsoleActionF("set_decel_multiplier", setDecelMult);
|
addConsoleActionF("set_decel_multiplier", setDecelMult);
|
||||||
addConsoleActionI("set_accel_len", setAccelLen);
|
|
||||||
addConsoleAction("accelinfo", accelInfo);
|
addConsoleAction("accelinfo", accelInfo);
|
||||||
|
|
||||||
setAccelLen(engineConfiguration->accelLength);
|
setMapAccelLen(engineConfiguration->mapAccelLength);
|
||||||
|
setTpsAccelLen(engineConfiguration->tpsAccelLength);
|
||||||
}
|
}
|
||||||
#endif /* ! EFI_UNIT_TEST */
|
#endif /* ! EFI_UNIT_TEST */
|
||||||
|
|
|
@ -593,9 +593,9 @@ void setDefaultConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
||||||
boardConfiguration->idle.stepperStepPin = GPIO_UNASSIGNED;
|
boardConfiguration->idle.stepperStepPin = GPIO_UNASSIGNED;
|
||||||
boardConfiguration->idle.stepperDirectionPin = GPIO_UNASSIGNED;
|
boardConfiguration->idle.stepperDirectionPin = GPIO_UNASSIGNED;
|
||||||
|
|
||||||
engineConfiguration->accelLength = 6;
|
engineConfiguration->mapAccelLength = 6;
|
||||||
engineConfiguration->accelEnrichmentThreshold = 5; // kPa
|
engineConfiguration->mapAccelEnrichmentThreshold = 5; // kPa
|
||||||
engineConfiguration->accelEnrichmentMultiplier = 2;
|
engineConfiguration->mapAccelEnrichmentMultiplier = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_ENGINE_PARAMETER_S) {
|
void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_ENGINE_PARAMETER_S) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// this section was generated by config_definition.jar on Wed Apr 08 21:53:21 EDT 2015
|
// this section was generated by config_definition.jar on Fri Apr 10 23:17:12 EDT 2015
|
||||||
// begin
|
// begin
|
||||||
#include "rusefi_types.h"
|
#include "rusefi_types.h"
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -1087,11 +1087,23 @@ typedef struct {
|
||||||
/**
|
/**
|
||||||
* offset 1636
|
* offset 1636
|
||||||
*/
|
*/
|
||||||
int unused3[140];
|
int unused3[137];
|
||||||
|
/**
|
||||||
|
* offset 2184
|
||||||
|
*/
|
||||||
|
int tpsAccelLength;
|
||||||
|
/**
|
||||||
|
* offset 2188
|
||||||
|
*/
|
||||||
|
float tpsAccelEnrichmentThreshold;
|
||||||
|
/**
|
||||||
|
* offset 2192
|
||||||
|
*/
|
||||||
|
float tpsAccelEnrichmentMultiplier;
|
||||||
/**
|
/**
|
||||||
* offset 2196
|
* offset 2196
|
||||||
*/
|
*/
|
||||||
int accelLength;
|
int mapAccelLength;
|
||||||
/**
|
/**
|
||||||
* offset 2200
|
* offset 2200
|
||||||
*/
|
*/
|
||||||
|
@ -1103,11 +1115,11 @@ typedef struct {
|
||||||
/**
|
/**
|
||||||
* offset 2208
|
* offset 2208
|
||||||
*/
|
*/
|
||||||
float accelEnrichmentThreshold;
|
float mapAccelEnrichmentThreshold;
|
||||||
/**
|
/**
|
||||||
* offset 2212
|
* offset 2212
|
||||||
*/
|
*/
|
||||||
float accelEnrichmentMultiplier;
|
float mapAccelEnrichmentMultiplier;
|
||||||
/** total size 2216*/
|
/** total size 2216*/
|
||||||
} engine_configuration_s;
|
} engine_configuration_s;
|
||||||
|
|
||||||
|
@ -1255,4 +1267,4 @@ typedef struct {
|
||||||
} persistent_config_s;
|
} persistent_config_s;
|
||||||
|
|
||||||
// end
|
// end
|
||||||
// this section was generated by config_definition.jar on Wed Apr 08 21:53:21 EDT 2015
|
// this section was generated by config_definition.jar on Fri Apr 10 23:17:12 EDT 2015
|
||||||
|
|
|
@ -483,14 +483,18 @@ custom pin_input_mode_e 4 scalar, F32, @OFFSET@, "ms", 1, 0, 0, 200, 1
|
||||||
float alternatorControlPFactor;
|
float alternatorControlPFactor;
|
||||||
float alternatorControlIFactor;
|
float alternatorControlIFactor;
|
||||||
float alternatorControlDFactor;
|
float alternatorControlDFactor;
|
||||||
int[140] unused3;
|
int[137] unused3;
|
||||||
|
|
||||||
|
int tpsAccelLength;;"len", 1, 0, 0, 200, 3
|
||||||
|
float tpsAccelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3
|
||||||
|
float tpsAccelEnrichmentMultiplier;;"coeff", 1, 0, 0, 200, 3
|
||||||
|
|
||||||
int accelLength;;"len", 1, 0, 0, 200, 3
|
int mapAccelLength;;"len", 1, 0, 0, 200, 3
|
||||||
|
|
||||||
float decelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3
|
float decelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3
|
||||||
float decelEnrichmentMultiplier;;"coeff", 1, 0, 0, 200, 3
|
float decelEnrichmentMultiplier;;"coeff", 1, 0, 0, 200, 3
|
||||||
float accelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3
|
float mapAccelEnrichmentThreshold;;"roc", 1, 0, 0, 200, 3
|
||||||
float accelEnrichmentMultiplier;;"coeff", 1, 0, 0, 200, 3
|
float mapAccelEnrichmentMultiplier;;"coeff", 1, 0, 0, 200, 3
|
||||||
|
|
||||||
end_struct
|
end_struct
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue