Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Audio countdown feedback #1192

Merged
merged 2 commits into from
Aug 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app/src/main/org/runnerup/workout/WorkoutBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ private static void createAudioCountdown(Step step) {
case TIME:
// seconds
Double[] tmp0 = {
60d, 30d, 10d, 5d, 3d, 2d, 1d
60d, 30d, 10d, 5d, 4d, 3d, 2d, 1d
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intentional for me, I do not want to be disturbed too much.
This is basically a 1,2,5,10,20,50 sequence modified for 60s and added 3
The 3 could be dropped.

Someone else have an opinion?
I could live with this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say dropping the 5 feels more natural than dropping the 3

};
list.addAll(Arrays.asList(tmp0));
break;
Expand All @@ -536,6 +536,11 @@ private static void createAudioCountdown(Step step) {
return;
}

// Extent the feedback list with more values for longer countdowns
while (step.getDurationValue() / 2 > list.get(0)) {
list.add(0, list.get(0) * 2d);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or add every minute?
OK for me

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took doubling over every minute because it fits in the sequence and might be less disturbing, but I am fine with either

}

// Remove all values in list close to the step
while (list.size() > 0 && step.getDurationValue() < list.get(0) * 1.1d) {
list.remove(0);
Expand Down