InfiniTime icon indicating copy to clipboard operation
InfiniTime copied to clipboard

Stopwatch: add persistence

Open pptime02 opened this issue 3 years ago • 6 comments

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.

pptime02 avatar Nov 01 '22 17:11 pptime02

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 avatar Nov 01 '22 18:11 desttinghim

Those are probably leftover from the work I did

desttinghim avatar Nov 01 '22 21:11 desttinghim

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

pptime02 avatar Nov 02 '22 06:11 pptime02

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

minacode avatar Nov 02 '22 09:11 minacode

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.

pptime02 avatar Nov 02 '22 19:11 pptime02

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

Xylemon avatar Feb 14 '24 22:02 Xylemon