This commit is contained in:
Matthew Kennedy 2020-10-07 11:59:24 -07:00 committed by GitHub
parent cef405c83f
commit a9e2a5cd1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 8 deletions

View File

@ -317,16 +317,17 @@ void configureHondaAccordShifted(TriggerWaveform *s) {
void configureOnePlus16(TriggerWaveform *s) {
s->initialize(FOUR_STROKE_CAM_SENSOR);
int totalTeethCount = 16;
int skippedCount = 0;
int count = 16;
float tooth = s->getCycleDuration() / count;
float width = tooth / 2; // for VR we only handle rises so width does not matter much
s->addEvent720(2, T_PRIMARY, TV_RISE);
addSkippedToothTriggerEvents(T_SECONDARY, s, totalTeethCount, skippedCount, 0.5, 0, 360, 2, 20);
s->addEvent720(20, T_PRIMARY, TV_FALL);
addSkippedToothTriggerEvents(T_SECONDARY, s, totalTeethCount, skippedCount, 0.5, 0, 360, 20, NO_RIGHT_FILTER);
s->addEventAngle(1, T_PRIMARY, TV_RISE);
s->addEventAngle(5, T_PRIMARY, TV_FALL);
addSkippedToothTriggerEvents(T_SECONDARY, s, totalTeethCount, skippedCount, 0.5, 360, 360, NO_LEFT_FILTER,
NO_RIGHT_FILTER);
for (int i = 1; i <= count; i++) {
s->addEventAngle(tooth * i - width, T_SECONDARY, TV_RISE);
s->addEventAngle(tooth * i, T_SECONDARY, TV_FALL);
}
s->isSynchronizationNeeded = false;
s->useOnlyPrimaryForSync = true;