From d5370d03b8b1f9f16782150afed5e28b14f2b241 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sun, 28 Oct 2018 17:15:12 -0400 Subject: [PATCH] why does this work?! --- unit_tests/test_trigger_decoder.cpp | 3 +- unit_tests/triggers.txt | 190 ++++++++++++++-------------- 2 files changed, 97 insertions(+), 96 deletions(-) diff --git a/unit_tests/test_trigger_decoder.cpp b/unit_tests/test_trigger_decoder.cpp index ab7abf97b3..fab4ad8ab7 100644 --- a/unit_tests/test_trigger_decoder.cpp +++ b/unit_tests/test_trigger_decoder.cpp @@ -230,7 +230,7 @@ void testTriggerDecoder2(const char *msg, engine_type_e type, int synchPointInde initSpeedDensity(PASS_ENGINE_PARAMETER_SIGNATURE); - TriggerShape *t = ð.engine.triggerCentral.triggerShape; + TriggerShape *t = &ENGINE(triggerCentral.triggerShape); assertFalseM("isError", t->shapeDefinitionError); @@ -559,6 +559,7 @@ void testTriggerDecoder(void) { testTriggerDecoder3("citroen", CITROEN_TU3JP, 0, 0.4833, 0.0, 2.9994); testTriggerDecoder2("MAZDA_323", MAZDA_323, 0, 0.4833, 0); + testTriggerDecoder2("CAMARO_4", CAMARO_4, 34, 0.5, 0); testTriggerDecoder3("neon NGC4", DODGE_NEON_2003_CAM, 6, 0.5000, 0.0, CHRYSLER_NGC4_GAP); diff --git a/unit_tests/triggers.txt b/unit_tests/triggers.txt index c6b073bf77..567cc83ae8 100644 --- a/unit_tests/triggers.txt +++ b/unit_tests/triggers.txt @@ -1708,103 +1708,103 @@ event 125 0 695.00 event 126 1 700.00 event 127 0 705.00 TRIGGERTYPE 27 96 TT_GM_LS_24 0.00 -# duty 0.48 0.00 +# duty 0.50 0.00 event 0 1 0.00 -event 1 0 3.36 -event 2 1 15.07 -event 3 0 18.49 -event 4 1 21.06 -event 5 0 33.59 -event 6 1 36.16 -event 7 0 48.61 -event 8 1 60.28 -event 9 0 63.58 -event 10 1 75.29 -event 11 0 78.59 -event 12 1 90.34 -event 13 0 93.65 -event 14 1 96.32 -event 15 0 108.77 -event 16 1 120.58 -event 17 0 123.91 -event 18 1 126.55 -event 19 0 139.02 -event 20 1 150.16 -event 21 0 152.82 -event 22 1 164.61 -event 23 0 167.81 -event 24 1 179.61 -event 25 0 182.83 -event 26 1 194.68 -event 27 0 197.93 -event 28 1 209.77 -event 29 0 213.05 -event 30 1 215.73 -event 31 0 228.17 -event 32 1 230.78 -event 33 0 243.18 -event 34 1 245.77 -event 35 0 258.15 -event 36 1 260.78 -event 37 0 273.16 -event 38 1 275.79 -event 39 0 288.20 -event 40 1 299.95 -event 41 0 303.27 -event 42 1 305.93 -event 43 0 318.35 -event 44 1 320.95 -event 45 0 333.37 -event 46 1 335.96 -event 47 0 348.33 +event 1 0 3.00 +event 2 1 6.00 +event 3 0 18.00 +event 4 1 30.00 +event 5 0 33.00 +event 6 1 36.00 +event 7 0 48.00 +event 8 1 51.00 +event 9 0 63.00 +event 10 1 66.00 +event 11 0 78.00 +event 12 1 81.00 +event 13 0 93.00 +event 14 1 96.00 +event 15 0 108.00 +event 16 1 120.00 +event 17 0 123.00 +event 18 1 135.00 +event 19 0 138.00 +event 20 1 150.00 +event 21 0 153.00 +event 22 1 165.00 +event 23 0 168.00 +event 24 1 180.00 +event 25 0 183.00 +event 26 1 186.00 +event 27 0 198.00 +event 28 1 210.00 +event 29 0 213.00 +event 30 1 225.00 +event 31 0 228.00 +event 32 1 240.00 +event 33 0 243.00 +event 34 1 246.00 +event 35 0 258.00 +event 36 1 261.00 +event 37 0 273.00 +event 38 1 285.00 +event 39 0 288.00 +event 40 1 300.00 +event 41 0 303.00 +event 42 1 306.00 +event 43 0 318.00 +event 44 1 321.00 +event 45 0 333.00 +event 46 1 336.00 +event 47 0 348.00 event 48 1 360.00 -event 49 0 363.36 -event 50 1 375.07 -event 51 0 378.49 -event 52 1 381.06 -event 53 0 393.59 -event 54 1 396.15 -event 55 0 408.61 -event 56 1 420.28 -event 57 0 423.58 -event 58 1 435.29 -event 59 0 438.59 -event 60 1 450.34 -event 61 0 453.65 -event 62 1 456.32 -event 63 0 468.77 -event 64 1 480.58 -event 65 0 483.91 -event 66 1 486.55 -event 67 0 499.02 -event 68 1 510.16 -event 69 0 512.82 -event 70 1 524.61 -event 71 0 527.81 -event 72 1 539.61 -event 73 0 542.83 -event 74 1 554.67 -event 75 0 557.93 -event 76 1 569.77 -event 77 0 573.05 -event 78 1 575.73 -event 79 0 588.17 -event 80 1 590.78 -event 81 0 603.18 -event 82 1 605.77 -event 83 0 618.15 -event 84 1 620.78 -event 85 0 633.16 -event 86 1 635.79 -event 87 0 648.20 -event 88 1 659.95 -event 89 0 663.27 -event 90 1 665.93 -event 91 0 678.35 -event 92 1 680.95 -event 93 0 693.37 -event 94 1 695.96 -event 95 0 708.33 +event 49 0 363.00 +event 50 1 366.00 +event 51 0 378.00 +event 52 1 390.00 +event 53 0 393.00 +event 54 1 396.00 +event 55 0 408.00 +event 56 1 411.00 +event 57 0 423.00 +event 58 1 426.00 +event 59 0 438.00 +event 60 1 441.00 +event 61 0 453.00 +event 62 1 456.00 +event 63 0 468.00 +event 64 1 480.00 +event 65 0 483.00 +event 66 1 495.00 +event 67 0 498.00 +event 68 1 510.00 +event 69 0 513.00 +event 70 1 525.00 +event 71 0 528.00 +event 72 1 540.00 +event 73 0 543.00 +event 74 1 546.00 +event 75 0 558.00 +event 76 1 570.00 +event 77 0 573.00 +event 78 1 585.00 +event 79 0 588.00 +event 80 1 600.00 +event 81 0 603.00 +event 82 1 606.00 +event 83 0 618.00 +event 84 1 621.00 +event 85 0 633.00 +event 86 1 645.00 +event 87 0 648.00 +event 88 1 660.00 +event 89 0 663.00 +event 90 1 666.00 +event 91 0 678.00 +event 92 1 681.00 +event 93 0 693.00 +event 94 1 696.00 +event 95 0 708.00 TRIGGERTYPE 28 96 TT_HONDA_CBR_600 0.00 # duty 0.50 0.00 event 0 1 0.00