Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: F1 boot + ajbrec.ajz = ?
From: Mike Holden (rockbox_at_mikeholden.uklinux.net)
Date: 2003-07-20


Johan Vromans said:
> "Mike Holden" <rockbox_at_mikeholden.uklinux.net> writes:
>
>> so I was removing the different #ifdef paths, as they aren't needed
>> any more.
>
> Did you run the sources through "gcc -E"?
>

I have now! The only difference (apart from white space) in the output
between the two versions of the file is that the original file has a line
which says

# 166 "recorder/icons.c"

at the point where the #ifdef is defined. I have no idea what this means!
The full diff is below. icons1 is a clean copy of recorder/icons.c with
the #ifder SIMULATOR block removed, but with the other ifdefs for platform
left in there:

    fill=percent;
    if (fill < 0)
        fill = 0;
    if (fill > 100)
        fill = 100;

#ifdef HAVE_CHARGE_CTRL /* Recorder */
    /* show graphical animation when charging instead of numbers */
    if ((global_settings.battery_type) && (charge_state != 1)) {
#else /* FM */
    if (global_settings.battery_type) {
#endif /* HAVE_CHARGE_CTRL */
        /* Numeric display */

icons2 is the clean version of the code from CVS.

[rockbox_at_aslan apps]$ diff icons1 icons2
622,626c622
<
<
<
<
<

---
> # 166 "recorder/icons.c"
629a626
>

> I was just wondering about the purpose of > > #ifdef HAVE_CHARGE_DETECT /* Recorder & FM */ > ^^^^^^^^ > > in the source recorder/icons.c. > ^^^^^^^^

Sorry should have been more specific. I'm talking about a clean CVS download here, not the code within my patch. This seems to fail with regular Rockbox, as well as my "twisted" version!

> > Unless there's something deliberately obfuscating going on, I'd say this > #ifdef is superfluous since it is always true in recorder sources. > >> However, various changes in that area result in the battery display >> being very low numbers (like 4 or 7), instead of the actual value >> which is 85-100. > > I would like to have an option to display the raw battery voltage > 'cause sometimes I think it would provide better information than the > highly processed percentage value (i.e., when trying to explain > strange readings).

Good idea! -- Mike Holden

Rockbox page: http://www.mikeholden.org/~rockbox



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa