From: Jürgen H. <ju...@ar...> - 2008-10-26 20:56:00
|
Hi list, first of all, thank you for making lxde. I just started using it and encountered a bug in batt.c. I'm getting a charge of 99800% 30 seconds after start-up of the panel. This is caused because on start-up get_batt_* is called with use_sysfs=0, #0 get_batt_info (bi=0x8858168, use_sysfs=0) at batt.c:126 #1 0xb703e921 in check_batteries (b=0x8a940b8) at batt.c:517 #2 0xb703f64f in constructor (p=0x8a93aa0, fp=0xbff74a74) at batt.c:765 #0 get_batt_state (bi=0x8858168, use_sysfs=0) at batt.c:152 #1 0xb703e939 in check_batteries (b=0x8a940b8) at batt.c:518 #2 0xb703f64f in constructor (p=0x8a93aa0, fp=0xbff74a74) at batt.c:765 but when update_timeout is called, g_list_foreach passes a gboolean* to use_sysfs instead of the gboolean value of use_sysfs. #0 get_batt_state (bi=0x8858168, use_sysfs=145310076) at batt.c:152 #1 0xb7b56927 in g_list_foreach () from /usr/lib/libglib-2.0.so.0 #2 0xb703ea43 in update_timout (b=0x8a940b8) at batt.c:547 #3 0xb7b59896 in g_timeout_dispatch () from /usr/lib/libglib-2.0.so.0 This causes calculation of the current capacity based on the sysfs value: POWER_SUPPLY_CHARGE_NOW=3903000 compared to the procfs value from startup: last full capacity: 3907 mAh Patch enclosed. Regards, Jürgen |