joeycastillo / Sensor-Watch

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

Face for tracking the menstrual cycle #250

Open jokomo24 opened 1 year ago

jokomo24 commented 1 year ago

I discovered the Casio F-91W through my partner, appreciated the retro analog aesthetic of the watch, and got one for myself. Soon afterward I discovered the Sensor Watch project and ordered two boards, thank you!! I introduced the Sensor Watch to my partner who inquired whether she could track her menstrual cycle. So I decided to implement a menstrual cycle watch face that also calculates the peak fertility window using The Calendar Method.

joeycastillo commented 11 months ago

This is such a great idea, thanks for making this! And monumental apologies for the delay in reviewing it.

All looks good, except for one warning that I need your guidance to resolve. The switch statement on line 326, handing the alarm long press, can fall through. I'm not sure if that is intentional or not. Can you resolve by either adding a break; at the end of that case, or if the fall-through is intentional, by adding a // fall through comment where the break would be? Either of these things will resolve the warning.

Thanks again!

jokomo24 commented 10 months ago

Of course and thank you for your hard work, this project is awesome! My apologies as well for taking so long to respond, I just completed a move and a job search so times were a bit hectic.

But yes, nice catch! I did not intend to let this EVENT_ALARM_LONG_PRESS case to fall through. Also, I uncommented my use of the beep function for "production". The simulator would freeze during testing of the watch face if I did not comment it out and I could not determine exactly why.

Thanks again for your feedback and the chance to contribute!

jokomo24 commented 10 months ago

Now that I've gotten this face on a physical watch, I've noticed a few bugs. Mainly, the value for "Period in # days" and for "Average Cycle" becomes zero after a short period of time. I will be looking into it!

jokomo24 commented 10 months ago

I've identified that the issue occurs when reseting the watch face using the reset page. So the bug must reside in my reset function...

CarpeNoctem commented 10 months ago

I've identified that the issue occurs when reseting the watch face using the reset page. So the bug must reside in my reset function...

Nice work on this face! Just checking - has this all been resolved as of c1ac01d3d57d6e4670bf8d9e1e177a92a5cb1e92?

jokomo24 commented 10 months ago

I've identified that the issue occurs when reseting the watch face using the reset page. So the bug must reside in my reset function...

Nice work on this face! Just checking - has this all been resolved as of c1ac01d?

Yes, this has been resolved! Was a simple typo mistake where I used watch_store_backup_data(state->dates.reg, state->backup_register_cy) instead of watch_store_backup_data(state->cycles.reg, state->backup_register_cy).

Also, in reset_tracking(), I tried to clear the entire register using state->dates.reg = 0 and state->cycles.reg = 0 but that did not work as expected, so I went back to setting the bits to 0 explicitly just like in menstrual_cycle_face_setup().

Thank you for the review and acknowledgements!