Repository navigation
Conversation
Require RUNNING state and measure a configurable delay from each engine start. Reuse a padding byte to preserve the stored tune layout. Add startup and restart regressions. Fixes FOME-Tech#820.
The fixture drives RPM directly. The MAF/trigger helper needlessly invokes all configuration-change callbacks and can read an ETB PID configuration left by a previous test. Disable ignition directly and keep the existing DFCO assertions. Verified all 733 tests with Valgrind (zero errors) and ASan; the recorded restart fuel trace is unchanged.
|
does this need its own threshold? is there another parameter/piece of state we can recycle? |
|
ASE looks like a suitable state to reuse. I propose keeping the ASE should taper back to 1.0. If the table keeps requesting enrichment, DFCO would remain inhibited; that behavior would be documented as a calibration requirement. TunerStudio supports conditional text and panels. We could show a note when table-based ASE and DFCO are both enabled, in the ASE table view and the DFCO dialog:
This would retain the protection requested in #820 without adding another tuning parameter. We would also need to calculate the current ASE factor before updating DFCO and handle timer resets on restarts, including transitions to RUNNING without an intervening cranking callback. Would you agree with this approach? |
| } | ||
|
|
||
| void expectFuel(bool cut) { | ||
| EXPECT_EQ(cut, engine->module<DfcoController>()->cutFuel()); |
There was a problem hiding this comment.
Don't wrap gtest EXPECT... in a helper - it loses the file/line number where the assertion failure happened. If you want a helper, use a #define instead, as that'll expand inline and preserve the error's location.
27 upstream commits: WiFi reliability fixes, log and ini download over WiFi (FOME-Tech#842), partial pick of FOME-Tech#823 (inhibit DFCO unless running), ETB idle range up to 30% (FOME-Tech#845), H7 flash fixes (FOME-Tech#833), MK60e5 speed decode fix. Conflicts resolved: - dfco.cpp: upstream's isRunning() check (same code, upstream comment) followed by our after-start enrichment check, which upstream lacks - test_fuelCut.cpp: upstream's RUNNING setup for existing tests; our four new tests kept - CHANGELOG.md: both sides' entries kept This merge alone overflows vthpnp RAM by 25,744 bytes; the next commit makes it fit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Per review feedback on FOME-Tech#823: gtest assertions inside a helper function report the helper's line rather than the test's, and a failed ASSERT only returns from the helper, so the test carries on. As a macro the assertions expand in the test body and fail at the right line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fixes #820.
DFCO can zero after-start enrichment during a warm-start flare. Overlapping cranking and DFCO RPM thresholds can also cancel cranking fuel.
Require
RpmCalculator::isRunning()and adddfcoStartupDelay, measured from each transition to RUNNING. The engine-start timer covers direct STOPPED→RUNNING restarts, where the enrichment timer can still contain the previous start's elapsed time.The setting is 0–255 s, defaulting to 10 s for new tunes. It is independent of scalar/table enrichment and
dfcoDelay; choose a duration that covers the configured taper. Zero disables the hold-off while retaining the cranking/spin-up gate. The field reuses padding at byte 1227, preserving existing offsets and configuration sizes. Existing tunes with zero in that byte retain zero delay and need the hold-off configured explicitly.Validation
Integration
Based directly on master. DFCO merges cleanly with #822 (
5a83b5f326) and #821 (c625f3fe9c4), individually in either order and after their combined integration. 759 general + 36 ADCv2 + 21 ADCv4 tests pass together throughmake -j12 test. Combining #821 and #822 themselves requires retaining both sets of changelog entries; DFCO introduces no additional conflict.Related: #819, which fixes the separate timing ramp. That combination passed 750 tests with extended ramp coverage. Its ramp test needs an explicit RUNNING state and
dfcoStartupDelay = 0when combined with this gate.