6.1 Hemi V8 decoder #2010

This commit is contained in:
rusefillc 2020-12-04 15:22:53 -05:00
parent d191d31272
commit 45e47220ab
3 changed files with 4 additions and 1 deletions

View File

@ -56,6 +56,7 @@ void initializeMazdaMiataNaShape(TriggerWaveform *s) {
void initializeMazdaMiataNb2Crank(TriggerWaveform *s) {
/**
* Note how we use 0..180 range while defining FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR trigger
* Note that only half of the physical wheel is defined here!
*/
s->initialize(FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR);

View File

@ -240,7 +240,7 @@ void TriggerWaveform::addEvent(angle_t angle, trigger_wheel_e const channelIndex
expectedEventCount[channelIndex]++;
}
efiAssertVoid(CUSTOM_ERR_6599, angle > 0, "angle should be positive");
efiAssertVoid(CUSTOM_ERR_6599, angle > 0 && angle <= 1, "angle should be positive not above 1");
if (privateTriggerDefinitionSize > 0) {
if (angle <= previousAngle) {
warning(CUSTOM_ERR_TRG_ANGLE_ORDER, "invalid angle order: new=%.2f/%f and prev=%.2f/%f, size=%d",
@ -330,6 +330,7 @@ void TriggerWaveform::setTriggerSynchronizationGap2(float syncRatioFrom, float s
void TriggerWaveform::setTriggerSynchronizationGap3(int gapIndex, float syncRatioFrom, float syncRatioTo) {
isSynchronizationNeeded = true;
efiAssertVoid(OBD_PCM_Processor_Fault, gapIndex >= 0 && gapIndex < GAP_TRACKING_LENGTH, "gapIndex out of range");
this->syncronizationRatioFrom[gapIndex] = syncRatioFrom;
this->syncronizationRatioTo[gapIndex] = syncRatioTo;
if (gapIndex == 0) {

View File

@ -68,6 +68,7 @@ class TriggerState;
class TriggerFormDetails;
class TriggerConfiguration;
// https://github.com/rusefi/rusefi/issues/2010 shows the corner case wheel with huge depth requirement
#define GAP_TRACKING_LENGTH 4
/**