Skip to content

Commit 4603561

Browse files
committed
custom exercise voice command
1 parent 0f53f79 commit 4603561

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

FitCount/Workout/QuickPoseBasicView.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import QuickPoseSwiftUI
1111

1212
struct VoiceCommands {
1313
public static let standInsideBBox = Text2Speech(text: "Stand so that your whole body is inside the bounding box")
14-
public static let letUsStartTheExercise = Text2Speech(text: "Now let's start the exercise")
1514
}
1615

1716
class SessionData: ObservableObject {
@@ -42,7 +41,7 @@ struct QuickPoseBasicView: View {
4241
let exerciseTimer = TimerManager()
4342

4443
@State var isInBBox = false
45-
@State var state = WorkoutState.bbox
44+
@State var state = WorkoutState.exercise
4645

4746
@State private var indicatorWidth: CGFloat = 0.0
4847

@@ -175,7 +174,7 @@ struct QuickPoseBasicView: View {
175174
}
176175

177176
if (state == WorkoutState.exercise && !exerciseTimer.isRunning()) {
178-
VoiceCommands.letUsStartTheExercise.say()
177+
Text2Speech(text: "Now let's start the \(exercise.name) exercise").say()
179178
exerciseTimer.start()
180179
}
181180

0 commit comments

Comments
 (0)