Merge lp://qastaging/~ricmm/usensord/vibrate-no-sleep into lp://qastaging/usensord

Proposed by Ricardo Mendoza
Status: Merged
Approved by: Ricardo Salveti
Approved revision: 32
Merged at revision: 24
Proposed branch: lp://qastaging/~ricmm/usensord/vibrate-no-sleep
Merge into: lp://qastaging/usensord
Diff against target: 73 lines (+37/-0)
1 file modified
haptic/haptic.go (+37/-0)
To merge this branch: bzr merge lp://qastaging/~ricmm/usensord/vibrate-no-sleep
Reviewer Review Type Date Requested Status
Ricardo Salveti (community) Approve
PS Jenkins bot continuous-integration Approve
Charles Kerr (community) Approve
Review via email: mp+256612@code.qastaging.launchpad.net

Commit message

Take a powerd state while theres an active vibration request, also give a grace period after vibration ended before suspending, so as to not peg the hardware actuator if the cpu goes offline before the end timer has expired.

To post a comment you must log in.
25. By Ricardo Mendoza

Fix indentation

26. By Ricardo Mendoza

Reduce timeout to 1.5s

27. By Ricardo Mendoza

Make sure cookie is not null before attempting to clear

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
28. By Ricardo Mendoza

Dont stack locks

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
29. By Ricardo Mendoza

Only remove the old lock after the new one has been taken, to prevent a few ticks of lock-less processing where we could suspend

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

Comments inline

review: Needs Information
30. By Ricardo Mendoza

Use global timer instead and keep a mutex-protected single cookie instance

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

Some minor comments made to ricmm in irc, but otherwise this LGTM.

review: Approve
31. By Ricardo Mendoza

Move into individual vibration block

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
32. By Ricardo Mendoza

Reduce mutex scope and make sure lock also takes into consideration the sleep time

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Looking good, working as expected.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches