InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.7k stars 923 forks source link

Stopwatch: add persistence #1410

Open pptime02 opened 1 year ago

pptime02 commented 1 year ago

Stopwatch now keeps running in background if screen is left. Implemented this by introducing a StopWatchController. In additon, now an infinite lap count is possible (but only two laps are stored). Largely based on the work of Louis Pearson (@desttinghim), see https://github.com/InfiniTimeOrg/InfiniTime/pull/783. Nevertheless, I removed all changes not related to the stopwatch persistence feature.

The corresponding PR to InfiniSim (for adding the StopWatchController) is https://github.com/InfiniTimeOrg/InfiniSim/pull/75. Would close https://github.com/InfiniTimeOrg/InfiniTime/issues/303.

desttinghim commented 1 year ago

Cool! Glad to see this is getting completed. I started working on rebasing it but I didn't want to get a build environment set up - thank you for taking it on :slightly_smiling_face:

desttinghim commented 1 year ago

Those are probably leftover from the work I did

pptime02 commented 1 year ago

Thank you all for taking a look on it. I think I applied all proposals, and found no further lowercase-functions.

minacode commented 1 year ago

What about those struct types that end with _t? Do they fit our code style?

pptime02 commented 1 year ago

What about those struct types that end with _t? Do they fit our code style?

I checked other structs by running rg 'struct .*_t \{' InfiniTime/src/ and rg 'struct .* \{' InfiniTime/src/. Seems like the stopwatch was the only place where _t was used, thus I removed the remaining _t it in the last commit.

Xylemon commented 7 months ago

Any chance of this getting rebased against main? This would be very useful.