refactoring - reusing magic constant
This commit is contained in:
parent
2e9e5c2745
commit
293bf45763
|
@ -122,9 +122,9 @@ int TriggerWaveform::getTriggerWaveformSynchPointIndex() const {
|
|||
angle_t TriggerWaveform::getCycleDuration() const {
|
||||
switch (operationMode) {
|
||||
case FOUR_STROKE_THREE_TIMES_CRANK_SENSOR:
|
||||
return 120;
|
||||
return 720 / SYMMETRICAL_THREE_TIMES_CRANK_SENSOR_DIVIDER;
|
||||
case FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR:
|
||||
return 180;
|
||||
return 720 / SYMMETRICAL_CRANK_SENSOR_DIVIDER;
|
||||
case FOUR_STROKE_CRANK_SENSOR:
|
||||
case TWO_STROKE:
|
||||
return 360;
|
||||
|
@ -141,6 +141,7 @@ angle_t TriggerWaveform::getCycleDuration() const {
|
|||
*/
|
||||
size_t TriggerWaveform::getLength() const {
|
||||
/**
|
||||
* 6 for FOUR_STROKE_THREE_TIMES_CRANK_SENSOR
|
||||
* 4 for FOUR_STROKE_SYMMETRICAL_CRANK_SENSOR
|
||||
* 2 for FOUR_STROKE_CRANK_SENSOR
|
||||
* 1 otherwise
|
||||
|
|
Loading…
Reference in New Issue