Update PosePhaseDetector.kt
This commit is contained in:
@@ -197,14 +197,18 @@ class PosePhaseDetector {
|
||||
rightElbowAngleDegrees = angles.rightElbow
|
||||
)
|
||||
|
||||
// Identify the next phase we are looking for in the sequence.
|
||||
// Identify the next phase we are looking for in the sequence. The
|
||||
// only BowlingPhase values not already matched above are
|
||||
// BACK_SWING/POWER_STEP (never currentPhase -- see this class's
|
||||
// doc) and FOLLOW_THROUGH, so reaching else always means
|
||||
// FOLLOW_THROUGH: the final phase, nothing to advance to.
|
||||
val targetPhase = when (currentPhase) {
|
||||
null -> BowlingPhase.STARTING_STANCE
|
||||
BowlingPhase.STARTING_STANCE -> BowlingPhase.APPROACH
|
||||
BowlingPhase.APPROACH -> BowlingPhase.PUSHAWAY
|
||||
BowlingPhase.PUSHAWAY -> BowlingPhase.SLIDE_AND_RELEASE
|
||||
BowlingPhase.SLIDE_AND_RELEASE -> BowlingPhase.FOLLOW_THROUGH
|
||||
else -> currentPhase
|
||||
else -> BowlingPhase.FOLLOW_THROUGH
|
||||
}
|
||||
|
||||
// 1. Check if the user is in the NEXT phase.
|
||||
|
||||
Reference in New Issue
Block a user