joeycastillo / Sensor-Watch

A board replacement for the classic Casio F-91W wristwatch
Other
1.02k stars 210 forks source link

Add Couch-To-5k training face #305

Closed ekaitz-zarraga closed 7 months ago

ekaitz-zarraga commented 8 months ago

This is a watch face that follows this program for running:

http://www.c25k.com/

The program is designed to train 3 times a week. Each training is a session. Each of the rounds you have in the training is an exercise.

The training goes like this: 5min warm-up walk -> Run X minutes -> Walk Y minutes -> ... -> Stop

The watch face shows it like this: The weekday indicator shows if you need to Warm Up (WU), run (rU), walk (WA) or stop (--).

The month-day indicator shows the session you are in (from 1 to 27).

The timer shows the time you have left in the exercise and the exercise you are doing (MM:SS:ee). When an exercise finishes you are notified with an alarm. When the whole session finishes, a different tone is played for a longer period.

Pressing the ALARM button pauses/resumes the clock.

Pressing the LIGHT button does nothing if the timer is not paused. When it is paused it clears the current session (it restarts it to the beginning) and if it was already cleared or the current session was finished moves to the next session.

ekaitz-zarraga commented 8 months ago

About the changes proposed:

There are other things I don't have very clear, but I'm open for suggestions.

Thanks! It was a lot of fun to do!

ekaitz-zarraga commented 7 months ago

Looks good overall! The main thing I'd ask is that you rename it couch_to_5k_face to fit in with the naming convention of the other faces.

Yeah, that looks better. Done. 30c8da7f553146e22be456f0852351dff7269e1f

You should also consider if you want to do anything for entering LE mode — I think returning to the default face would be reasonable, since even on the lowest timeout, the exercise will be completed before we enter LE mode.

Good, I added this too. f77ddc83b8b1ac5b9516496d0f9ead7865026ce5

In terms of energy usage, it's slightly better to just update the characters that changed, but it's not a big deal, and I think it's not worth it for this face, which people would only be using once a day for around half an hour.

Good!

Saving some space would be good, but I also feel fine about merging this without that. I think the easiest way to do that would be to make C25K_SESSIONS a double-pointer, so you don't need to repeat the duplicate sessions in memory.

It is already an array of pointers that points to the arrays of the session values. During the first weeks the session is repeated 3 times per week, and it's using the same array for them. There are other ways to reduce memory usage, but I also agree this is ok.

Thanks for the comments and suggestions.