auto-sync
This commit is contained in:
parent
9a65bfe806
commit
7bdba4166c
|
@ -10,6 +10,7 @@
|
|||
#include "custom_engine.h"
|
||||
#include "honda_accord.h"
|
||||
#include "allsensors.h"
|
||||
#include "engine_math.h"
|
||||
|
||||
EXTERN_ENGINE;
|
||||
|
||||
|
@ -74,6 +75,8 @@ void setCustomEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
boardConfiguration->injectionPins[2] = GPIOB_8; // #3
|
||||
boardConfiguration->injectionPins[3] = GPIOB_7; // #4
|
||||
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER);
|
||||
|
||||
#if EFI_PWM_TESTER
|
||||
boardConfiguration->injectionPins[4] = GPIOC_8; // #5
|
||||
boardConfiguration->injectionPins[5] = GPIOD_10; // #6
|
||||
|
|
|
@ -434,7 +434,7 @@ void setDodgeNeonNGCEngineConfiguration(DECLARE_ENGINE_PARAMETER_F) {
|
|||
|
||||
// boardConfiguration->tunerStudioSerialSpeed = 9600;
|
||||
boardConfiguration->tunerStudioSerialSpeed = 19200;
|
||||
engineConfiguration->algorithm = LM_SPEED_DENSITY;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER);
|
||||
|
||||
boardConfiguration->alternatorControlPin = GPIOD_5;
|
||||
engineConfiguration->alternatorControl.pFactor = 22;
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "dodge_ram.h"
|
||||
#include "custom_engine.h"
|
||||
#include "allsensors.h"
|
||||
#include "engine_math.h"
|
||||
|
||||
EXTERN_ENGINE
|
||||
;
|
||||
|
@ -22,7 +23,7 @@ void setDodgeRam1996(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->trigger.type = TT_DODGE_RAM;
|
||||
engineConfiguration->injector.flow = 243.6; // 23.2lb/h
|
||||
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
|
||||
engineConfiguration->algorithm = LM_SPEED_DENSITY;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER);
|
||||
|
||||
// set_cranking_charge_angle 30
|
||||
engineConfiguration->crankingChargeAngle = 30;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "main.h"
|
||||
#include "dodge_stratus.h"
|
||||
#include "engine_math.h"
|
||||
|
||||
EXTERN_ENGINE
|
||||
;
|
||||
|
@ -19,7 +20,7 @@ void setDodgeStratus(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->specs.firingOrder = FO_1_THEN_2_THEN_3_THEN_4_THEN_5_THEN_6;
|
||||
|
||||
engineConfiguration->map.sensor.type = MT_DODGE_NEON_2003;
|
||||
engineConfiguration->algorithm = LM_SPEED_DENSITY;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER);
|
||||
engineConfiguration->ignitionMode = IM_INDIVIDUAL_COILS;
|
||||
|
||||
boardConfiguration->ignitionPins[0] = GPIOC_9;
|
||||
|
|
|
@ -55,7 +55,7 @@ void setFordEscortGt(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->globalFuelCorrection = 0.75;
|
||||
engineConfiguration->specs.displacement = 1.839;
|
||||
// engineConfiguration->algorithm = LM_PLAIN_MAF;
|
||||
engineConfiguration->algorithm = LM_SPEED_DENSITY;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER);
|
||||
// engineConfiguration->algorithm = LM_REAL_MAF;
|
||||
boardConfiguration->tunerStudioSerialSpeed = 14400;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ void setVwAba(DECLARE_ENGINE_PARAMETER_F) {
|
|||
engineConfiguration->specs.displacement = 2.5;
|
||||
engineConfiguration->injector.flow = 320; // 30lb/h
|
||||
// set_algorithm 3
|
||||
engineConfiguration->algorithm = LM_SPEED_DENSITY;
|
||||
setAlgorithm(LM_SPEED_DENSITY PASS_ENGINE_PARAMETER);
|
||||
engineConfiguration->map.sensor.type = MT_GM_3_BAR;
|
||||
|
||||
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
||||
|
|
|
@ -206,6 +206,12 @@ static void periodicFastCallback(DECLARE_ENGINE_PARAMETER_F) {
|
|||
chVTSetAny(&periodicFastTimer, 20 * TICKS_IN_MS, (vtfunc_t) &periodicFastCallback, engine);
|
||||
}
|
||||
|
||||
static void resetAccel(void) {
|
||||
engine->engineLoadAccelEnrichment.reset();
|
||||
engine->tpsAccelEnrichment.reset();
|
||||
wallFuel.reset();
|
||||
}
|
||||
|
||||
static void periodicSlowCallback(Engine *engine) {
|
||||
efiAssertVoid(getRemainingStack(chThdSelf()) > 64, "lowStckOnEv");
|
||||
#if EFI_PROD_CODE
|
||||
|
@ -223,7 +229,7 @@ static void periodicSlowCallback(Engine *engine) {
|
|||
#if (EFI_PROD_CODE && EFI_ENGINE_CONTROL && EFI_INTERNAL_FLASH) || defined(__DOXYGEN__)
|
||||
writeToFlashIfPending();
|
||||
#endif
|
||||
wallFuel.reset();
|
||||
resetAccel();
|
||||
}
|
||||
|
||||
if (versionForConfigurationListeners.isOld()) {
|
||||
|
@ -437,13 +443,6 @@ static void setFloat(const char *offsetStr, const char *valueStr) {
|
|||
getFloat(offset);
|
||||
}
|
||||
|
||||
#if EFI_PROD_CODE || defined(__DOXYGEN__)
|
||||
static void resetAccel(void) {
|
||||
engine->engineLoadAccelEnrichment.reset();
|
||||
engine->tpsAccelEnrichment.reset();
|
||||
}
|
||||
#endif
|
||||
|
||||
void initConfigActions(void) {
|
||||
addConsoleActionSS("set_float", (VoidCharPtrCharPtr) setFloat);
|
||||
addConsoleActionII("set_int", (VoidIntInt) setInt);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "event_registry.h"
|
||||
#include "efiGpio.h"
|
||||
#include "fuel_math.h"
|
||||
#include "advance_map.h"
|
||||
|
||||
EXTERN_ENGINE
|
||||
;
|
||||
|
@ -36,7 +37,7 @@ EXTERN_ENGINE
|
|||
extern engine_pins_s enginePins;
|
||||
|
||||
/**
|
||||
* @return number of milliseconds in one crankshaft revolution
|
||||
* @return number of milliseconds in one crank shaft revolution
|
||||
*/
|
||||
floatms_t getCrankshaftRevolutionTimeMs(int rpm) {
|
||||
return 360 * getOneDegreeTimeMs(rpm);
|
||||
|
@ -425,6 +426,7 @@ void setAlgorithm(engine_load_mode_e algo DECLARE_ENGINE_PARAMETER_S) {
|
|||
if (algo == LM_ALPHA_N) {
|
||||
setTimingLoadBin(0, 100 PASS_ENGINE_PARAMETER);
|
||||
} else if (algo == LM_SPEED_DENSITY) {
|
||||
buildTimingMap(35 PASS_ENGINE_PARAMETER);
|
||||
setTimingLoadBin(0, 160 PASS_ENGINE_PARAMETER);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue