DAIHATSU 3CYLINDER TRIGGER WHEEL SUPPORT fix #2008

This commit is contained in:
rusefillc 2020-12-03 23:12:30 -05:00
parent fec3c3c443
commit c6d49e9621
5 changed files with 32 additions and 2 deletions

View File

@ -25,3 +25,27 @@ void configureFiatIAQ_P8(TriggerWaveform * s) {
s->setTriggerSynchronizationGap(3);
}
void configureDaihatsu4(TriggerWaveform * s) {
s->initialize(FOUR_STROKE_CAM_SENSOR);
s->isSynchronizationNeeded = true;
int width = 10;
s->setTriggerSynchronizationGap(0.125);
s->addEvent720(30 - width, T_PRIMARY, TV_RISE);
s->addEvent720(30, T_PRIMARY, TV_FALL);
s->addEvent720(s->getCycleDuration() / 3 - width, T_PRIMARY, TV_RISE);
s->addEvent720(s->getCycleDuration() / 3, T_PRIMARY, TV_FALL);
s->addEvent720(s->getCycleDuration() / 3 * 2 - width, T_PRIMARY, TV_RISE);
s->addEvent720(s->getCycleDuration() / 3 * 2, T_PRIMARY, TV_FALL);
s->addEvent720(s->getCycleDuration() - width, T_PRIMARY, TV_RISE);
s->addEvent720(s->getCycleDuration(), T_PRIMARY, TV_FALL);
}

View File

@ -10,4 +10,5 @@
#include "trigger_structure.h"
void configureFiatIAQ_P8(TriggerWaveform * s);
void configureDaihatsu4(TriggerWaveform * s);

View File

@ -543,6 +543,9 @@ void TriggerWaveform::initializeTriggerWaveform(Logging *logger, operation_mode_
break;
case TT_TT_DAIHATSU:
configureDaihatsu4(this);
break;
case TT_VVT_JZ:
setToothedWheelConfiguration(this, 3, 0, ambiguousOperationMode);
break;

View File

@ -555,7 +555,7 @@ void printAllTriggers() {
engine->initializeTriggerWaveform(NULL PASS_ENGINE_PARAMETER_SUFFIX);
if (shape->shapeDefinitionError) {
printf("Trigger error %d\r\n", triggerId);
printf("Trigger shapeDefinitionError %d\r\n", triggerId);
exit(-1);
}

View File

@ -32,13 +32,15 @@ efitick_t getTimeNowNt(void) {
LoggingWithStorage sharedLogger("main");
extern bool printTriggerDebug;
extern bool printTriggerTrace;
bool verboseMode = false;
GTEST_API_ int main(int argc, char **argv) {
// printTriggerDebug = true;
// printTriggerTrace = true;
// resizeMap();
printf("Success 20200510\r\n");
printf("Success 20201203\r\n");
printAllTriggers();
testing::InitGoogleTest(&argc, argv);