reducing ugly

This commit is contained in:
rusefi 2022-11-06 20:47:57 -05:00
parent 7cc6d9c07c
commit ec77afeaa0
4 changed files with 5 additions and 5 deletions

View File

@ -338,8 +338,8 @@ void Engine::OnTriggerSyncronization(bool wasSynchronized, bool isDecodingError)
if (engineConfiguration->verboseTriggerSynchDetails || (triggerCentral.triggerState.someSortOfTriggerError() && !engineConfiguration->silentTriggerError)) { if (engineConfiguration->verboseTriggerSynchDetails || (triggerCentral.triggerState.someSortOfTriggerError() && !engineConfiguration->silentTriggerError)) {
efiPrintf("error: synchronizationPoint @ index %d expected %d/%d got %d/%d", efiPrintf("error: synchronizationPoint @ index %d expected %d/%d got %d/%d",
triggerCentral.triggerState.currentCycle.current_index, triggerCentral.triggerState.currentCycle.current_index,
TRIGGER_WAVEFORM(getExpectedEventCount(TriggerWheel::T_PRIMARY)), triggerCentral.triggerShape.getExpectedEventCount(TriggerWheel::T_PRIMARY),
TRIGGER_WAVEFORM(getExpectedEventCount(TriggerWheel::T_SECONDARY)), triggerCentral.triggerShape.getExpectedEventCount(TriggerWheel::T_SECONDARY),
triggerCentral.triggerState.currentCycle.eventCount[0], triggerCentral.triggerState.currentCycle.eventCount[0],
triggerCentral.triggerState.currentCycle.eventCount[1]); triggerCentral.triggerState.currentCycle.eventCount[1]);
} }

View File

@ -58,7 +58,7 @@ void setSingleCoilDwell();
// expectation is that for well-known triggers engineConfiguration->globalTriggerAngleOffset would usually be zero // expectation is that for well-known triggers engineConfiguration->globalTriggerAngleOffset would usually be zero
// while for toothed wheels user would have to provide a value // while for toothed wheels user would have to provide a value
#define tdcPosition() \ #define tdcPosition() \
(TRIGGER_WAVEFORM(tdcPosition) + engineConfiguration->globalTriggerAngleOffset) (getTriggerCentral()->triggerShape.tdcPosition + engineConfiguration->globalTriggerAngleOffset)
/** Gets phase offset for a particular cylinder's ID and number /** Gets phase offset for a particular cylinder's ID and number
* For example on 4 cylinder engine with firing order 1-3-4-2, this * For example on 4 cylinder engine with firing order 1-3-4-2, this

View File

@ -266,5 +266,3 @@ public:
*/ */
angle_t eventAngles[2 * PWM_PHASE_MAX_COUNT]; angle_t eventAngles[2 * PWM_PHASE_MAX_COUNT];
}; };
#define TRIGGER_WAVEFORM(x) getTriggerCentral()->triggerShape.x

View File

@ -38,6 +38,8 @@ WaveChart waveChart;
static scheduling_s debugToggleScheduling; static scheduling_s debugToggleScheduling;
#define DEBUG_PIN_DELAY US2NT(60) #define DEBUG_PIN_DELAY US2NT(60)
#define TRIGGER_WAVEFORM(x) getTriggerCentral()->triggerShape.x
#if EFI_SHAFT_POSITION_INPUT #if EFI_SHAFT_POSITION_INPUT
TriggerCentral::TriggerCentral() : TriggerCentral::TriggerCentral() :