Count up, change timer to red, and ring for 10s when timer completes.#1499
Count up, change timer to red, and ring for 10s when timer completes.#1499emosenkis wants to merge 6 commits intoInfiniTimeOrg:mainfrom
Conversation
There was a problem hiding this comment.
There is an issue that when closing the app, the alerting continues. I think pressing the button once should stop the alert, but stay in the app, while long pressing the button should go to the watchface and also stop the alert.
Alarm (app) keeps the watch awake during the alerting. I wonder if this should do the same.
If left unattended, the alert can go on forever, making noise and draining the battery. The vibration should stop after ~10s and the watch can then go to sleep, but keep counting the overtime.
fa392a7 to
5aa6ef7
Compare
emosenkis
left a comment
There was a problem hiding this comment.
There is an issue that when closing the app, the alerting continues. I think pressing the button once should stop the alert, but stay in the app, while long pressing the button should go to the watchface and also stop the alert.
Alarm (app) keeps the watch awake during the alerting. I wonder if this should do the same.
If left unattended, the alert can go on forever, making noise and draining the battery. The vibration should stop after ~10s and the watch can then go to sleep, but keep counting the overtime.
For now, I've made it keep the watch awake and vibrate for 10s, after which it stops. Can your suggestions about the two button behaviors be separate from this PR? I think this is already a big improvement and should enable many more real-world use cases for the timer now that it will be easier to notice when it completes, and it counts up after completing.
On a separate note, I had to add another timer object to TimerController - I tried to set the existing timer for 10s and restart it in OnTimerEnd but while both calls succeeded, the callback didn't get called again.
|
Adding the button behaviour shouldn't be too complicated and it's pretty important to avoid making the stopping of the ringing hinder usability. Also I consider the fact that the vibration doesn't stop when closing the app a bug. I think the timed stopping of the ringing should probably be handled in the app rather than the controller, as I think it's a UI thing. You can use LVGL tasks for this. Please refer to AlarmController.cpp and Alarm.cpp for both of these issues. |
|
@Riksu9000 I think I've addressed all your feedback - the button now behaves the way you asked, the app controls the ringing, leaving the app by button or by swiping should ensure that the ringing is stopped. |
…control of ringing.
079c080 to
6755c59
Compare
|
@Riksu9000 rebased and fixed |
|
Ping @Riksu9000 |
|
Long pressing (the button) hasn't been addressed and there are some issues still, but I'm also reconsidering this feature in this issue #391 (comment) |
Fixes #1374
Fresh implementation of similar features of #557