Re: [gpm] [Patch] Play a sound loop when the laptop battery/ups reaches a critical level



On 4 March 2010 06:01, Pramod Dematagoda <pmd lotr gandalf gmail com> wrote:
> The patches in the archive are as follows:-
>
> 0001-Do-not-set-a-charge-warning-if-the-device-is-on-AC.patch -
> This is sort of the preliminary fix before the real one, in this case it
> resets any warning if we are on ac so that if you get a situation where
> the power supply is plain weird by fluctuating on and off, g-p-m stays
> on track.

Looks good.

> 0002-Play-a-sound-loop-if-the-charge-of-a-laptop-battery-.patch -
> This is the one that fixes the bug report mentioned. It implements a new
> function that starts a sound loop, it only acknowledges one action
> parameter because that should be the only case where it would need to be
> used. The sound loop is stopped before the critical action is done and
> if DkpClient(soon UPClient?) tells us we're on ac.

Cool.

> 0003-If-a-battery-charge-is-low-but-not-critical-don-t-pl.patch -
> This is just a user experience tweak so that we don't play a sound for a
> low charge event that's actually meant for a critical charge event.

Right.

> 0004-Fix-a-problem-where-the-critical-action-is-not-done-.patch -
> It would seem that the critical action is not done if we're using a UPS,
> this patch fixes it.

Good catch, thanks.

> So after applying the patches, you should get a sweetly annoying alarm
> when the charge of a certain device reaches the critical level. ;)
>
> Hope the patches are acceptable. :)

Yes, all are okay. Please commit and push to git master. Thanks!

Richard.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]