Updating from lmctl 0.3.2 (well, the 0.3.2 tarball, the directory still says 0.3.1...), using this as the main(): int main (int argc, char **argv) { int i; mouse_t *mouse; for (i = 0; mice[i].pid != 0; i++) { mouse = &(mice[i]); printf (" <!-- %s -->\n", mouse->name); printf (" <match key=\"usb_device.product_id\" int=\"0x%x\">\n", mouse->pid); printf (" <append key=\"info.addons\" type=\"strlist\">hald-addon-usb-csr</append>\n"); printf (" <merge key=\"battery.type\" type=\"string\">mouse</merge>\n"); printf (" <merge key=\"battery.is_rechargeable\" type=\"bool\">true</merge>\n"); printf (" <!-- proprietary properties defining the behavior -->\n"); printf (" <merge key=\"battery.csr.has_res\" type=\"bool\">%s</merge>\n", mouse->has_res ? "true" : "false"); printf (" <merge key=\"battery.csr.has_sms\" type=\"bool\">%s</merge>\n", mouse->has_sms ? "true" : "false"); printf (" <merge key=\"battery.csr.is_dual\" type=\"bool\">%s</merge>\n", mouse->is_dual ? "true" : "false"); printf (" </match>\n"); printf ("\n"); } return 0; } Patch attached
Created attachment 5069 [details] [review] hal-more-lmctl-mice.patch
Sorry for the lag. Richard just committed this.
Umm.. I'm not sure all of those should launch the csr addon... my logitech wired mouse (no battery in sight) reports 0% battery power with todays CVS... Or should the csr addon just bail out if there is no battery to monitor?
Looks like I got a bit overzealous adding new mice. lmctl uses CSR for a few features other than battery. The easiest would be to check (manually) whether the mouse is wireless, and remove it if yes. I'll start checking which ones need to be removed.
Created attachment 5363 [details] [review] hal-less-lmctl-mice.patch Removed all the wired mice (looked through Google for which ones weren't wireless)
Shouldn't we also add: <merge key="info.product" type="string">Cordless Presenter Receiver</merge> As we know the device name, so we should probably update it to something more than USB mouse?
2006-04-24 Richard Hughes <richard@hughsie.com> * fdi/information/10freedesktop/10-wireless-mice.fdi: Update the patch from http://bugs.freedesktop.org/show_bug.cgi?id=6397 as we are trying to detect wired mice here as well. Also add the proper product names, giving a nicer name in hal-device-manager.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.