treiher / valens

An app for tracking your health and training progress.
GNU Affero General Public License v3.0
11 stars 3 forks source link

Excercise does not advance automatically #31

Closed senier closed 10 months ago

senier commented 10 months ago

I'm testing with 0.2.1.dev101 installed from TestPyPI. It's running on Debian 12 using Apache mod_wsgi.

When starting a training session using the "play" button, I can hear the metronome sound. However, after the configured amount of repetitions the first exercise remains active and the metronome beeps continue indefinitely. Clicking the double downwards arrows brings me to the following rest period which ends after the configured amount of seconds as expected. The following exercise does not advance automatically, either.

This happens on both, desktop (Gnome Web) and mobile (Fennec).

Screenshot from 2023-12-28 12-02-57

treiher commented 10 months ago

At present, the "automatic" option only has an effect if a time but no repetition target has been set. In this case, a timer is displayed and the session automatically advances to the next exercise/rest when the timer expires. I think the correct behaviour would be to also show a timer in cases where both a time and a repetition target is given and let the timer start at repetitions * time. In addition, it would make sense to prevent the "automatic" option from being enabled if no time is given. Would this behaviour meet your expectations?

senier commented 10 months ago

I have to admit, that my intuition about that feature was a totally different one. I thought that the time field would set the intended duration for a single repetition and that you would get repetitions metronome sounds and then advance to the next activity (after repetitions * time seconds).

I'm not saying this is necessarily the best way to do it, but isn't the 1 Hz metronome pretty distracting during exercising? (I haven't tried the app in practice, so I cannot tell)

treiher commented 10 months ago

The time field can be used for two purposes:

  1. Isometric exercises like Planks. There the time represents the duration (e.g. the Plank was hold for 60 s).
  2. Dynamic exercises like Push Ups. There the time represents the tempo/cadence of a single repetition (e.g. 10 Push Up reps with a tempo of 4 s per rep).

Your intuition actually sounds exactly right and is what I envisioned. I would additionally show a timer for repetitions * time seconds, so that the user has some visual feedback.

I would say that using the time field for tracking the tempo/cadence is an advanced feature. The metronome can help to ensure to keep the intended tempo, as there is a natural tendency to do the repetitions faster than optimal (a typical recommendation is a tempo of 3-4 seconds per repetition, but the optimal tempo also depends on the exercise and the training goal). The feature is optional. If you are not interested in tracking the tempo, you can just ignore the time field for dynamic exercises. If you want to track the tempo, but are not interested in using the metronome, you can disable it in the settings (i.e. setting "Metronome" to "Manual").

senier commented 10 months ago

Sounds good! I agree that it's not critical, but if you get around implementing it, I'd be happy to test it :wink:

treiher commented 10 months ago

It's implemented now. The fix is included in version 0.3.0, which has just been released. I'd be happy to hear if it meets your expectations.

senier commented 10 months ago

I just upgraded to 0.3.0 and tested it. Works like a charm. Great work, keep it up!