From 547f96cac046a1e8c745a3027d149368c7cb4612 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Sun, 29 Jan 2017 01:04:16 -0500 Subject: [PATCH] auto-sync --- firmware/config/engines/subaru.cpp | 12 ++++++++++++ firmware/controllers/idle_thread.cpp | 22 +++++++++++++--------- firmware/rusefi.cpp | 2 +- hardware/frankenso/known_issues.txt | 4 +++- 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/firmware/config/engines/subaru.cpp b/firmware/config/engines/subaru.cpp index 709b0e3edf..a5c53e331e 100644 --- a/firmware/config/engines/subaru.cpp +++ b/firmware/config/engines/subaru.cpp @@ -22,4 +22,16 @@ void setSubaru2003Wrx(DECLARE_ENGINE_PARAMETER_F) { engineConfiguration->trigger.customSkippedToothCount = 1; engineConfiguration->sensorChartFrequency = 2; + + boardConfiguration->useStepperIdle = true; + + // todo: url + boardConfiguration->idle.stepperDirectionPin = GPIOD_1; // top stepper drive pin, white wire recommended + boardConfiguration->idle.stepperStepPin = GPIOD_6; // yellow wire recommended + engineConfiguration->stepperEnablePin = GPIOB_1; // bottom stepper driver board pin, blue wire recommended + + boardConfiguration->triggerSimulatorPins[0] = GPIO_UNASSIGNED; + boardConfiguration->triggerSimulatorPins[1] = GPIO_UNASSIGNED; + boardConfiguration->triggerSimulatorPins[2] = GPIO_UNASSIGNED; + } diff --git a/firmware/controllers/idle_thread.cpp b/firmware/controllers/idle_thread.cpp index 2cb14209f0..05ba54c1d1 100644 --- a/firmware/controllers/idle_thread.cpp +++ b/firmware/controllers/idle_thread.cpp @@ -64,23 +64,27 @@ 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), + const char * idleModeStr = getIdle_mode_e(engineConfiguration->idleMode); + scheduleMsg(logger, "idleMode=%s position=%f isStepper=%s", idleModeStr, getIdlePosition(), boolToString(boardConfiguration->useStepperIdle)); if (boardConfiguration->useStepperIdle) { - scheduleMsg(logger, "direction=%s reactionTime=%f", hwPortname(boardConfiguration->idle.stepperDirectionPin), + scheduleMsg(logger, "directionPin=%s reactionTime=%f", hwPortname(boardConfiguration->idle.stepperDirectionPin), engineConfiguration->idleStepperReactionTime); - scheduleMsg(logger, "step=%s steps=%d", hwPortname(boardConfiguration->idle.stepperStepPin), + scheduleMsg(logger, "stepPin=%s steps=%d", hwPortname(boardConfiguration->idle.stepperStepPin), engineConfiguration->idleStepperTotalSteps); - scheduleMsg(logger, "enable=%s", hwPortname(engineConfiguration->stepperEnablePin)); + scheduleMsg(logger, "enablePin=%s/%d", hwPortname(engineConfiguration->stepperEnablePin), + engineConfiguration->stepperEnablePinMode); } else { scheduleMsg(logger, "idle valve freq=%d on %s", boardConfiguration->idle.solenoidFrequency, hwPortname(boardConfiguration->idle.solenoidPin)); } - scheduleMsg(logger, "idleControl=%s", getIdle_control_e(engineConfiguration->idleControl)); - scheduleMsg(logger, "idle P=%f I=%f D=%f dT=%d", engineConfiguration->idleRpmPid.pFactor, - engineConfiguration->idleRpmPid.iFactor, - engineConfiguration->idleRpmPid.dFactor, - engineConfiguration->idleDT); + scheduleMsg(logger, "mode=%s", getIdle_control_e(engineConfiguration->idleControl)); + if (engineConfiguration->idleControl == IC_PID) { + scheduleMsg(logger, "idle P=%f I=%f D=%f dT=%d", engineConfiguration->idleRpmPid.pFactor, + engineConfiguration->idleRpmPid.iFactor, + engineConfiguration->idleRpmPid.dFactor, + engineConfiguration->idleDT); + } } void setIdleControlEnabled(int value) { diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index 3b6ae1d356..2a6646d7e0 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -249,5 +249,5 @@ int getRusEfiVersion(void) { return 123; // this is here to make the compiler happy about the unused array if (UNUSED_CCM_SIZE[0] * 0 != 0) return 3211; // this is here to make the compiler happy about the unused array - return 20170128; + return 20170129; } diff --git a/hardware/frankenso/known_issues.txt b/hardware/frankenso/known_issues.txt index d31af16faa..df08bb6289 100644 --- a/hardware/frankenso/known_issues.txt +++ b/hardware/frankenso/known_issues.txt @@ -93,7 +93,7 @@ 93) added pololu stepper driver Perhaps should be an add-on board. 94) RESOLVED IN R0.4.2 C701, LD601, LD602, LD605, LD606 silk screen mangled. 95) RESOLVED IN R0.4.2 D1001 doesn't have a polarity indicator in the silk screen -96) route unused stm32 pins (D3 PC13 etc) to unused connector pins +96) route unused stm32 pins (PD3 PC13 etc) to unused connector pins 97) cheaper battery holder - through-hole (need to find out footprint) 98) idle valve SMD diode? 99) silkscreen for analog inputs - PA1/PC1/etc? @@ -124,6 +124,8 @@ 124) RESOLVED IN R0.4.2 Change C210, C220, C240 from 0.01uF to 1uF, which removes loweres the filter cut off frequency, and decreases the noise seen by the ECU. 125) W701 is referred to as jumper WJ01 in the notes 126) Add a note about optional D12-D23 for solenoids +127) Add vias to button traces: PC8 PD11 PD10 (PD0 & PD2 already have those) +128) Add vias to most or all HL traces: PC7 PC9 PD8 PD9 PE8 PE10 PE12 PE14 For honda add-on / rewiring board -- Add 2A high side solinoid drive for VTec sol