This commit is contained in:
rusefi 2017-05-05 12:11:18 -04:00
parent e610a76ff1
commit 1f2b6dc5fc
2 changed files with 3 additions and 1 deletions

View File

@ -31,6 +31,7 @@ EXTERN_ENGINE;
void setRoverv8(DECLARE_ENGINE_PARAMETER_F) {
setOperationMode(engineConfiguration, FOUR_STROKE_CRANK_SENSOR);
// set trigger_type 9
engineConfiguration->trigger.type = TT_TOOTHED_WHEEL_36_1;
boardConfiguration->is_enabled_spi_2 = false;

View File

@ -51,6 +51,7 @@ void TriggerShape::calculateTriggerSynchPoint(TriggerState *state DECLARE_ENGINE
triggerShapeSynchPointIndex = findTriggerZeroEventIndex(state, this, triggerConfig PASS_ENGINE_PARAMETER);
engine->engineCycleEventCount = getLength();
efiAssertVoid(engine->engineCycleEventCount > 0, "shapeLength=0");
float firstAngle = getAngle(triggerShapeSynchPointIndex);
assertAngleRange(triggerShapeSynchPointIndex, "firstAngle");
@ -262,7 +263,7 @@ angle_t TriggerShape::getAngle(int index) const {
* See also trigger_central.cpp
* See also getEngineCycleEventCount()
*/
efiAssert(size != 0, "shapeSize=0", NAN);
int crankCycle = index / size;
int remainder = index % size;