Re: Re: first shoot for smartbattery

Zdzisław A. Kaleta
2005-01-10T22:41:07Z

Dnia poniedziałek 10 stycznia 2005 20:34, Johan Vromans napisał:
> "Zdzisław A. Kaleta" <sanskryt-FWhLrETftxM@public.gmane.org> writes:
> > Sorry to insist but still a mistake and I am not a coder ;-(
> > "Use of uninitialized value in concatenation (.) or string at
> > ./battstat.pl line 95."
> >
> > Line 95 is "$mw->title("Battery: $time ($status%)");"
> >
> > and there is no info in the windows
>
> 1. Would it be possible that you are running the 'original'
> smartbattery application, and not Pedro's enhanced version? [cut]
Probably You are right. I use smartbattery package from
http://www.poupinou.org/acpi/smartbatt/smartbatt/ from Bruno Duclrot site.
When I try to use a patch from Pedro Venda e-mail from 03/01/2005 I has a
smartbattery.c.rej with:
sanskryt@kender:/usr/local/src/modules/smartbatt$ cat smartbattery.c.rej
"***************
*** 300,307 ****
time_to_empty = i2c_smbus_read_word_data(file, 0x11);
time_to_full = i2c_smbus_read_word_data(file, 0x11);

- printf("current: %d mA\n", current & 0xffff);
- printf("remain: %d mA or mWh\n", remain & 0xffff);
printf("time to empty: %d minutes\n", time_to_empty & 0xffff);
printf("time to full: %d minutes\n", time_to_full & 0xffff);
printf("temperature: %2.1f C\n", ((temp & 0xffff) - 2730) / 10.);
--- 300,307 ----
time_to_empty = i2c_smbus_read_word_data(file, 0x11);
time_to_full = i2c_smbus_read_word_data(file, 0x11);

+ printf("current: %d mA\n", (current & 0xffff));
+ printf("remain: %d mAh or mW\n", remain & 0xffff);
printf("time to empty: %d minutes\n", time_to_empty & 0xffff);
printf("time to full: %d minutes\n", time_to_full & 0xffff);
printf("temperature: %2.1f C\n", ((temp & 0xffff) - 2730) / 10.);"
So it look like that I realy have the not proper smartbattery.c version. Where
I can find proper one?
>
> 2. You seem to be using SMbus #1, so did you change the line
>
> my $prog = "smartbattery2 0";
> to
> my $prog = "smartbattery2 1";
Yes I have noticed it and change acordingly
>
> -- Johan

--
z.a.kaleta (sanskryt), registered Linux User #279350