diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-03-24 13:25:49 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2014-03-24 13:25:49 +0100 |
commit | 0f78eb6ce67962a4147dce37cc4f8538d44b36d7 (patch) | |
tree | db7b627eaa37e767e2a08aad19683fc79a6477e8 /hw/usb/hid-logitech-dj.c | |
parent | 4215730f0ac21c625effe50ba14fbf050dc991a8 (diff) | |
download | qemu-0f78eb6ce67962a4147dce37cc4f8538d44b36d7.tar.gz |
unifying: implement BatteryStatus
Battery percentage is fuzzy... ok.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'hw/usb/hid-logitech-dj.c')
-rw-r--r-- | hw/usb/hid-logitech-dj.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/hw/usb/hid-logitech-dj.c b/hw/usb/hid-logitech-dj.c index 59bdc7f65c..6097f16822 100644 --- a/hw/usb/hid-logitech-dj.c +++ b/hw/usb/hid-logitech-dj.c @@ -603,6 +603,9 @@ static void hidpp_init_device(USBLtunifyState *s, int device_index, int devtype) memcpy(hd->info.name, "M525", 4); hd->info.device_name = "WirelessMouse M525"; hd->report_interval = 8; + hd->battery.nlevels = 2; + hd->battery.level = 2; /* Full - 90 % */ + hd->battery.critical_perc = 2; break; case DEVTYPE_TOUCHPAD: /* TODO: perhaps "unpair" mouse and use this touchpad instead? */ @@ -613,6 +616,10 @@ static void hidpp_init_device(USBLtunifyState *s, int device_index, int devtype) memcpy(hd->info.name, "T650", 4); hd->info.device_name = "Rechargeable Touchpad T650"; hd->report_interval = 8; + hd->battery.nlevels = 4; + hd->battery.level = 3; /* Good - 50 % */ + hd->battery.flags = BAT_FLAG_RECHARGEABLE; + hd->battery.critical_perc = 10; break; } if (hd->info.protocol_version >= 0x0200) { |