Rockbox

Tasklist

FS#1682 - beep when battery low

Attached to Project: Rockbox
Opened by Lee Pilgrim (diddystar5) - Monday, 08 September 2003, 03:56 GMT
Last edited by Lee Pilgrim (diddystar5) - Thursday, 24 March 2005, 19:04 GMT
Task Type Patches
Category
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch makes a "beep" everytime the battery icon
blinks in the status bar.
There may be a better way to do this, if so tell me.

Todo:
-Make it sound more like a beep. I borrowed code from
the "key click" patch, since I don't know how to make
sound myself.

-Make a setting in the system menu to turn it on/off

Suggestions/comments?
diddystar5_AT_aol_DOT_com
This task depends upon

Closed by  Zakk Roberts (midkay)
Sunday, 11 March 2007, 20:26 GMT
Reason for closing:  Out of Date
Additional comments about closing:  Out of date
Comment by Lee Pilgrim (diddystar5) - Monday, 08 September 2003, 04:01 GMT

This is the patch for feature request 802229.
Comment by Lee Pilgrim (diddystar5) - Monday, 08 September 2003, 04:04 GMT

Whoops! Thats feature request 626816.
Comment by Lee Pilgrim (diddystar5) - Saturday, 04 October 2003, 00:10 GMT

removed the #define... It's not really needed.
Comment by Lee Pilgrim (diddystar5) - Thursday, 25 March 2004, 18:39 GMT

I plan to revive this patch soon, since the new mp3_xx
functions are out. Stay tuned!
Comment by Blue Chip (bluechip) - Wednesday, 07 April 2004, 12:09 GMT

Just a note

do { mas_codec_writereg(0, 0); mas_codec_writereg(0, 1); }
while (0);

First off... This code is identical to:

mas_codec_writereg(0, 0);
mas_codec_writereg(0, 1);

Secondly, without checking the core code, I guess this just
enables and disables the audio, thus creating a "click" or "pop"
on the audio lines.

In theory, if you do this at the right speed you will create a
"tone" or "buzz" at a given frequency.

You are probably looking to create a frequency between about
200Hz and 1000Hz, so here is a basic idea for you, if you want
to try it.

int Hz = 444; /* Concert Pitch Middle A */
int Freq = 1000/Hz; /* 1000mS per S */

for (i=0; i<duration_mS; i+=Freq)
{
mas_codec_writereg(0, 0);
mas_codec_writereg(0, 1);
sleep_mS(Freq);
}
Comment by sebasto (taoandseb) - Wednesday, 23 March 2005, 14:06 GMT

hi, i'd like to use your patch but i'm not shure the way to
apply it. i use rockbox dev kit and when i type the
command "patch -p0 < batt_low_beep.diff.txt
it doesn't seem to apply properly. do i have to apply it in a
precise directory? i'm not really familiar with applying a patch
so would be really nice to help me a little, i'm a blind rockbox
user.
thanks.
seb
Comment by Lee Pilgrim (diddystar5) - Thursday, 24 March 2005, 19:03 GMT

Here is a somewhat updated version.
Apply it in the rockbox root directory

I used BC's beep (which I have not listened to, my recorder
is not around right now).

Todo: Support the new units (probably with the mp3 commands?)

Please give feedback!
Comment by Travis Hayes (travishayes89) - Monday, 17 July 2006, 05:10 GMT
blue chip, this may seem trivial, but concert tuning is actually A 440 (i play guitar so ive heard that a lot)
Comment by Eddy (bascule) - Tuesday, 06 March 2007, 20:14 GMT
I this relevant now that low battery shutdown is implemented for most (all?) targets?

Loading...