|Summary:||Add iDevice battery status|
|Product:||upower||Reporter:||Bastien Nocera <bugzilla>|
|Component:||general||Assignee:||Richard Hughes <richard>|
|Status:||RESOLVED FIXED||QA Contact:|
|i915 platform:||i915 features:|
patch for that
with fixed configure checks
and updated (and untested)
and the right patch
Description Bastien Nocera 2010-05-27 16:17:11 UTC
iDevices export their battery information. This isn't supported at the system level (kernel), so would require some custom code. - udev will show devices appearing and disappearing - for each device, we'll check the battery using: $ ideviceinfo -q com.apple.mobile.battery BatteryCurrentCapacity: 100 BatteryIsCharging: false every: $ ideviceinfo -q com.apple.mobile.iTunes | grep -i battery BatteryPollInterval: 60 seconds Ideas on where to integrate this exactly?
Comment 1 Bastien Nocera 2010-05-27 18:00:25 UTC
Created attachment 35895 [details] [review] patch for that Untested, but compiles :) Help appreciated for the FIXME, and the accuracy of the object properties used.
Comment 2 Bastien Nocera 2010-05-27 18:27:27 UTC
Created attachment 35896 [details] [review] with fixed configure checks Except that it doesn't work as expected because I get loads of those: usbmuxd_send: Error -1 when sending: Broken pipe on the command-line. I think that the connection to usbmuxd must be getting broken, maybe we need to reconnect for every poll. And gnome-power-manager doesn't show it either.
Comment 3 Richard Hughes 2010-05-27 23:20:37 UTC
Patch looks good on quick review. I don't think it's showing in g-p-m as you're not setting the "type", e.g. UP_DEVICE_KIND_UPS and it defaults to UP_DEVICE_KIND_UNKNOWN which g-p-m doesn't have rendering information about.
Comment 4 Bastien Nocera 2010-05-28 04:59:55 UTC
Created attachment 35905 [details] [review] and updated (and untested)
Comment 5 Bastien Nocera 2010-05-28 05:11:14 UTC
Created attachment 35907 [details] [review] and the right patch
Comment 6 Bastien Nocera 2010-05-28 07:00:15 UTC
And after 3 patches commited, we managed to make it work :) Requires gnome-power-manager from master to show anything though. Thanks Richard for the quick review(s)!