auto-sync
This commit is contained in:
parent
4361750df2
commit
d51a84c2a0
|
@ -128,9 +128,9 @@ void setDodgeNeon1995EngineConfiguration(engine_configuration_s *engineConfigura
|
|||
// set_global_trigger_offset_angle 497
|
||||
engineConfiguration->globalTriggerAngleOffset = 497;
|
||||
// set_ignition_offset 350
|
||||
engineConfiguration->ignitionOffset = 350;
|
||||
engineConfiguration->ignitionBaseAngle = 350;
|
||||
// set_injection_offset 510
|
||||
engineConfiguration->injectionOffset = 510;
|
||||
engineConfiguration->injectionAngle = 510;
|
||||
|
||||
/**
|
||||
* that's 1995 config
|
||||
|
|
|
@ -46,7 +46,7 @@ void setFordInline6(engine_configuration_s *engineConfiguration, board_configura
|
|||
engineConfiguration->triggerConfig.customIsSynchronizationNeeded = false;
|
||||
|
||||
engineConfiguration->globalTriggerAngleOffset = 0;
|
||||
engineConfiguration->ignitionOffset = 13;
|
||||
engineConfiguration->ignitionBaseAngle = 13;
|
||||
|
||||
setThermistorConfiguration(&engineConfiguration->cltThermistorConf, -10.0, 160310.0, 60.0, 7700.0, 120.0, 1180.0);
|
||||
engineConfiguration->cltThermistorConf.bias_resistor = 2700;
|
||||
|
|
|
@ -100,8 +100,8 @@ void setFordAspireEngineConfiguration(engine_configuration_s *engineConfiguratio
|
|||
|
||||
engineConfiguration->firingOrder = FO_1_THEN_3_THEN_4_THEN2;
|
||||
engineConfiguration->globalTriggerAngleOffset = 175;
|
||||
engineConfiguration->ignitionOffset = 98 - 11;
|
||||
engineConfiguration->injectionOffset = 59;
|
||||
engineConfiguration->ignitionBaseAngle = 98 - 11;
|
||||
engineConfiguration->injectionAngle = 59;
|
||||
|
||||
setDefaultAspireMaps(engineConfiguration);
|
||||
// set_cranking_rpm 550
|
||||
|
|
|
@ -77,7 +77,7 @@ static void setHondaAccordConfigurationCommon(engine_configuration_s *engineConf
|
|||
|
||||
|
||||
// set_ignition_offset 350
|
||||
// engineConfiguration->ignitionOffset = 350;
|
||||
// engineConfiguration->ignitionBaseAngle = 350;
|
||||
// set_injection_offset 510
|
||||
// engineConfiguration->injectionOffset = 510;
|
||||
|
||||
|
|
|
@ -228,9 +228,9 @@ void setFordEscortGt(engine_configuration_s *engineConfiguration, board_configur
|
|||
// set_global_trigger_offset_angle 256
|
||||
engineConfiguration->globalTriggerAngleOffset = 256;
|
||||
// set_ignition_offset 170
|
||||
engineConfiguration->ignitionOffset = 170;
|
||||
engineConfiguration->ignitionBaseAngle = 170;
|
||||
// set_injection_offset 510
|
||||
engineConfiguration->injectionOffset = 59;
|
||||
engineConfiguration->injectionAngle = 59;
|
||||
|
||||
setSingleCoilDwell(engineConfiguration);
|
||||
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
||||
|
|
|
@ -120,7 +120,7 @@ bool isSerialOverUart(void) {
|
|||
return is_serial_over_uart;
|
||||
}
|
||||
|
||||
#if EFI_USE_UART_FOR_CONSOLE || defined(__DOXYGEN__)
|
||||
#if defined(EFI_CONSOLE_UART_DEVICE) || defined(__DOXYGEN__)
|
||||
static SerialConfig serialConfig = { SERIAL_SPEED, 0, USART_CR2_STOP1_BITS | USART_CR2_LINEN, 0 };
|
||||
#endif
|
||||
|
||||
|
@ -197,7 +197,7 @@ void consoleOutputBuffer(const uint8_t *buf, int size) {
|
|||
void startConsole(void (*console_line_callback_p)(char *)) {
|
||||
console_line_callback = console_line_callback_p;
|
||||
|
||||
#if EFI_USE_UART_FOR_CONSOLE
|
||||
#if defined(EFI_CONSOLE_UART_DEVICE) || defined(__DOXYGEN__)
|
||||
|
||||
palSetPadMode(CONSOLE_MODE_SWITCH_PORT, CONSOLE_MODE_SWITCH_PIN, PAL_MODE_INPUT_PULLUP);
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ float getAdvance(int rpm, float engineLoad DECLARE_ENGINE_PARAMETER_S) {
|
|||
} else {
|
||||
angle = getBaseAdvance(rpm, engineLoad PASS_ENGINE_PARAMETER);
|
||||
}
|
||||
angle -= engineConfiguration->ignitionOffset;
|
||||
angle -= engineConfiguration->ignitionBaseAngle;
|
||||
fixAngle(angle);
|
||||
return angle;
|
||||
}
|
||||
|
|
|
@ -77,48 +77,6 @@ case INJECTOR_9_OUTPUT:
|
|||
return "INJECTOR_9_OUTPUT";
|
||||
case IO_INVALID:
|
||||
return "IO_INVALID";
|
||||
case LED_HUGE_0:
|
||||
return "LED_HUGE_0";
|
||||
case LED_HUGE_1:
|
||||
return "LED_HUGE_1";
|
||||
case LED_HUGE_10:
|
||||
return "LED_HUGE_10";
|
||||
case LED_HUGE_11:
|
||||
return "LED_HUGE_11";
|
||||
case LED_HUGE_12:
|
||||
return "LED_HUGE_12";
|
||||
case LED_HUGE_13:
|
||||
return "LED_HUGE_13";
|
||||
case LED_HUGE_14:
|
||||
return "LED_HUGE_14";
|
||||
case LED_HUGE_15:
|
||||
return "LED_HUGE_15";
|
||||
case LED_HUGE_16:
|
||||
return "LED_HUGE_16";
|
||||
case LED_HUGE_17:
|
||||
return "LED_HUGE_17";
|
||||
case LED_HUGE_18:
|
||||
return "LED_HUGE_18";
|
||||
case LED_HUGE_19:
|
||||
return "LED_HUGE_19";
|
||||
case LED_HUGE_2:
|
||||
return "LED_HUGE_2";
|
||||
case LED_HUGE_20:
|
||||
return "LED_HUGE_20";
|
||||
case LED_HUGE_3:
|
||||
return "LED_HUGE_3";
|
||||
case LED_HUGE_4:
|
||||
return "LED_HUGE_4";
|
||||
case LED_HUGE_5:
|
||||
return "LED_HUGE_5";
|
||||
case LED_HUGE_6:
|
||||
return "LED_HUGE_6";
|
||||
case LED_HUGE_7:
|
||||
return "LED_HUGE_7";
|
||||
case LED_HUGE_8:
|
||||
return "LED_HUGE_8";
|
||||
case LED_HUGE_9:
|
||||
return "LED_HUGE_9";
|
||||
case MAIN_RELAY:
|
||||
return "MAIN_RELAY";
|
||||
case O2_HEATER:
|
||||
|
|
|
@ -249,8 +249,8 @@ void setDefaultConfiguration(engine_configuration_s *engineConfiguration, board_
|
|||
|
||||
engineConfiguration->ignitionMode = IM_ONE_COIL;
|
||||
engineConfiguration->globalTriggerAngleOffset = 0;
|
||||
engineConfiguration->injectionOffset = 0;
|
||||
engineConfiguration->ignitionOffset = 0;
|
||||
engineConfiguration->injectionAngle = 0;
|
||||
engineConfiguration->ignitionBaseAngle = 0;
|
||||
engineConfiguration->overrideCrankingIgnition = true;
|
||||
engineConfiguration->analogChartFrequency = 20;
|
||||
|
||||
|
|
|
@ -360,7 +360,7 @@ typedef struct {
|
|||
/**
|
||||
* this value could be used to offset the whole ignition timing table by a constant
|
||||
*/
|
||||
float ignitionOffset;
|
||||
float ignitionBaseAngle;
|
||||
|
||||
/**
|
||||
* While cranking (which causes battery voltage to drop) we can calculate dwell time in shaft
|
||||
|
@ -491,7 +491,7 @@ typedef struct {
|
|||
/**
|
||||
* this is about deciding when the injector starts it's squirt
|
||||
*/
|
||||
float injectionOffset;
|
||||
float injectionAngle;
|
||||
|
||||
float crankingTimingAngle;
|
||||
|
||||
|
|
|
@ -74,29 +74,29 @@ typedef enum {
|
|||
* todo: this should be re-implemented in a smarter way with some sort of multiplexing anyway
|
||||
*/
|
||||
/* digit 1 */
|
||||
LED_HUGE_0, // B2
|
||||
LED_HUGE_1,
|
||||
LED_HUGE_2,
|
||||
LED_HUGE_3,
|
||||
LED_HUGE_4,
|
||||
LED_HUGE_5,
|
||||
LED_HUGE_6,
|
||||
/* digit 2 */
|
||||
LED_HUGE_7,
|
||||
LED_HUGE_8,
|
||||
LED_HUGE_9, // E15
|
||||
LED_HUGE_10,
|
||||
LED_HUGE_11,
|
||||
LED_HUGE_12,
|
||||
LED_HUGE_13,
|
||||
/* digit 3 */
|
||||
LED_HUGE_14,
|
||||
LED_HUGE_15,
|
||||
LED_HUGE_16,
|
||||
LED_HUGE_17,
|
||||
LED_HUGE_18,
|
||||
LED_HUGE_19,
|
||||
LED_HUGE_20,
|
||||
// LED_HUGE_0, // B2
|
||||
// LED_HUGE_1,
|
||||
// LED_HUGE_2,
|
||||
// LED_HUGE_3,
|
||||
// LED_HUGE_4,
|
||||
// LED_HUGE_5,
|
||||
// LED_HUGE_6,
|
||||
// /* digit 2 */
|
||||
// LED_HUGE_7,
|
||||
// LED_HUGE_8,
|
||||
// LED_HUGE_9, // E15
|
||||
// LED_HUGE_10,
|
||||
// LED_HUGE_11,
|
||||
// LED_HUGE_12,
|
||||
// LED_HUGE_13,
|
||||
// /* digit 3 */
|
||||
// LED_HUGE_14,
|
||||
// LED_HUGE_15,
|
||||
// LED_HUGE_16,
|
||||
// LED_HUGE_17,
|
||||
// LED_HUGE_18,
|
||||
// LED_HUGE_19,
|
||||
// LED_HUGE_20,
|
||||
|
||||
FUEL_PUMP_RELAY,
|
||||
FAN_RELAY,
|
||||
|
|
|
@ -46,7 +46,6 @@ static int is_injector_enabled[MAX_INJECTOR_COUNT];
|
|||
extern OutputPin outputs[IO_PIN_COUNT];
|
||||
|
||||
void initIgnitionCentral(void) {
|
||||
|
||||
for (int i = 0; i < engineConfiguration->cylindersCount; i++) {
|
||||
io_pin_e pin = (io_pin_e)((int)SPARKOUT_1_OUTPUT + i);
|
||||
outputPinRegisterExt2(getPinName(pin), &outputs[(int)pin], boardConfiguration->ignitionPins[i], &boardConfiguration->ignitionPinMode);
|
||||
|
@ -101,11 +100,13 @@ static void runBench(brain_pin_e brainPin, io_pin_e pin, float delayMs, float on
|
|||
chThdSleep(delaySt);
|
||||
}
|
||||
|
||||
OutputPin *output = &outputs[(int)pin];
|
||||
|
||||
isRunningBench = true;
|
||||
for (int i = 0; i < count; i++) {
|
||||
setOutputPinValue(pin, true);
|
||||
output->setValue(true);
|
||||
chThdSleep((int) (onTimeMs * CH_FREQUENCY / 1000));
|
||||
setOutputPinValue(pin, false);
|
||||
output->setValue(false);
|
||||
int offTimeSt = (int) (offTimeMs * CH_FREQUENCY / 1000);
|
||||
if (offTimeSt > 0) {
|
||||
chThdSleep(offTimeSt);
|
||||
|
@ -163,6 +164,18 @@ void fanBench(void) {
|
|||
needToRunBench = true;
|
||||
}
|
||||
|
||||
void milBench(void) {
|
||||
// brainPin = boardConfiguration->malfunctionIndicatorPin;
|
||||
// pinX = C;
|
||||
//
|
||||
// delayMs = 0;
|
||||
// onTime = 3000;
|
||||
// offTime = 0;
|
||||
// count = 1;
|
||||
//
|
||||
// needToRunBench = true;
|
||||
}
|
||||
|
||||
void fuelPumpBench(void) {
|
||||
brainPin = boardConfiguration->fuelPumpPin;
|
||||
pinX = FUEL_PUMP_RELAY;
|
||||
|
@ -243,6 +256,7 @@ void initInjectorCentral(Engine *engine) {
|
|||
addConsoleAction("fuelpumpbench", fuelPumpBench);
|
||||
addConsoleAction("fanbench", fanBench);
|
||||
|
||||
addConsoleAction("milbench", milBench);
|
||||
addConsoleActionSSS("fuelbench", fuelbench);
|
||||
addConsoleActionSSS("sparkbench", sparkbench);
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ void FuelSchedule::addFuelEvents(injection_mode_e mode DECLARE_ENGINE_PARAMETER_
|
|||
;
|
||||
list->reset();
|
||||
|
||||
float baseAngle = engineConfiguration->globalTriggerAngleOffset + engineConfiguration->injectionOffset;
|
||||
float baseAngle = engineConfiguration->globalTriggerAngleOffset + engineConfiguration->injectionAngle;
|
||||
|
||||
switch (mode) {
|
||||
case IM_SEQUENTIAL:
|
||||
|
|
|
@ -136,8 +136,8 @@ void printConfiguration(engine_configuration_s *engineConfiguration) {
|
|||
boolToString(engineConfiguration->isIgnitionEnabled));
|
||||
scheduleMsg(&logger, "timingMode: %d", /*getTiming_mode_etodo*/(engineConfiguration->timingMode));
|
||||
scheduleMsg(&logger, "fixedModeTiming: %d", (int) engineConfiguration->fixedModeTiming);
|
||||
scheduleMsg(&logger, "ignitionOffset=%f", engineConfiguration->ignitionOffset);
|
||||
scheduleMsg(&logger, "injectionOffset=%f/enabled=%s", (double) engineConfiguration->injectionOffset,
|
||||
scheduleMsg(&logger, "ignitionOffset=%f", engineConfiguration->ignitionBaseAngle);
|
||||
scheduleMsg(&logger, "injectionOffset=%f/enabled=%s", (double) engineConfiguration->injectionAngle,
|
||||
boolToString(engineConfiguration->isInjectionEnabled));
|
||||
|
||||
scheduleMsg(&logger, "map_avg=%s/mil=%s/fp=%s/ts=%s/wa=%s/it=%s/fastAdc=%s",
|
||||
|
@ -234,13 +234,13 @@ static void setIdlePinMode(int value) {
|
|||
}
|
||||
|
||||
static void setInjectionOffset(int value) {
|
||||
engineConfiguration->injectionOffset = value;
|
||||
engineConfiguration->injectionAngle = value;
|
||||
doPrintConfiguration(engine);
|
||||
incrementGlobalConfigurationVersion();
|
||||
}
|
||||
|
||||
static void setIgnitionOffset(int value) {
|
||||
engineConfiguration->ignitionOffset = value;
|
||||
engineConfiguration->ignitionBaseAngle = value;
|
||||
doPrintConfiguration(engine);
|
||||
incrementGlobalConfigurationVersion();
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ static msg_t Thread1(void *arg) {
|
|||
|
||||
void runRusEfi(void) {
|
||||
|
||||
#if EFI_USE_UART_FOR_CONSOLE
|
||||
#if defined(EFI_CONSOLE_UART_DEVICE)
|
||||
/*
|
||||
* Activates the serial driver 1 using the driver default configuration.
|
||||
* PA9 and PA10 are routed to USART1.
|
||||
|
|
|
@ -268,5 +268,5 @@ int getRusEfiVersion(void) {
|
|||
return 1; // this is here to make the compiler happy about the unused array
|
||||
if (UNUSED_CCM_SIZE == 0)
|
||||
return 1; // this is here to make the compiler happy about the unused array
|
||||
return 20150110;
|
||||
return 20150111;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue