log per-cylinder timing #76

This commit is contained in:
Matthew Kennedy 2023-05-31 11:38:06 -07:00
parent c2abe7219e
commit 04e6f45ce9
4 changed files with 6 additions and 12 deletions

View File

@ -28,6 +28,9 @@ Release template (copy/paste this for new release):
## Unreleased
### Added
- Log per-cylinder true ignition timing (includes trim, knock retard, etc) #76
### Fixed
- Improved bench test resolution (more usable for testing injectors, dwell, etc)
- Maximum knock retard table displays correct Y axis values in TunerStudio

View File

@ -217,6 +217,8 @@ uint16_t rpmAcceleration;dRPM;"RPM acceleration",1, 0, 0, 5, 2
int8_t[4 iterate] vvtTargets;;"deg",1, 0, 0, 0, 0
uint16_t turboSpeed;@@GAUGE_NAME_TURBO_SPEED@@;"hz",1, 0, 0, 0, 0
int16_t[12 iterate] autoscale ignitionAdvanceCyl;Ign: Timing Cyl;"deg",{1/@@PACK_MULT_ANGLE@@}, 0, 0, 0, 1
! fun fact: we have a separate pid_state.txt file for a bit of a different structure huh?
struct pid_status_s
float pTerm;;"", 1, 0, -50000, 50000, 2

View File

@ -23,11 +23,6 @@
#include "pch.h"
// dependency injection
#include "engine_state.h"
#include "rpm_calculator_api.h"
// end of injection
#if EFI_PRINTF_FUEL_DETAILS
bool printFuelDebug = false;
#endif // EFI_PRINTF_FUEL_DETAILS

View File

@ -9,11 +9,6 @@
#include "spark_logic.h"
// dependency injection
#include "engine_state.h"
#include "rpm_calculator_api.h"
// end of injection
#include "utlist.h"
#include "event_queue.h"
@ -85,8 +80,7 @@ static void prepareCylinderIgnitionSchedule(angle_t dwellAngleDuration, floatms_
// Pull any extra timing for knock retard
- engine->module<KnockController>()->getKnockRetard();
// TODO: Log "true" per-cylinder timing here #76
//engine->outputChannels......[event->cylinderNumber] = finalIgnitionTiming;
engine->outputChannels.ignitionAdvanceCyl[event->cylinderNumber] = finalIgnitionTiming;
angle_t sparkAngle =
// Negate because timing *before* TDC, and we schedule *after* TDC