-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows: Device report 0% charge if additional batteries already exist #11
Comments
You are welcome. This is known issue, unfortunately. Windows 10 does allow multiple batteries in the system and all of them can be displayed in the tray. However, the batteries must report their status in the same mode (HID specification supports maH, mwH and percentage) but most of UPS are only reporting percentage of charge. If you already have ACPI battery in your system (let's say you are testing on a laptop) then the percentage may not be reflected correctly. You may change the units in the sketch how the remaining charge is reported and this will fix the issue but it will be valid only for the Windows host with the ACPI battery. |
I just tested changing Are you interested in updating the |
Well, if your fix is tested on Linux, Mac and Windows then of course I will accept, why not? :-) Will be happy to. |
Great! However, it will take me some days to test on all those platforms. Will get back to you when I'm done. |
This fixes abratchik#11 by also reporting battery capacity percentage on Windows laptops that already has a battery.
This fixes abratchik#11 by also reporting battery capacity percentage on Windows laptops that already has a battery.
See #14 for a proposed fix this this annoyance. |
This fixes abratchik#11 by also reporting battery capacity percentage on Windows laptops that already has a battery.
This fixes abratchik#11 by also reporting battery capacity percentage on Windows laptops that already has a battery.
This fixes abratchik#11 by also reporting battery capacity percentage on Windows laptops that already has a battery. This makes the sample more interesting to demonstrate. The `CapacityMode` units are documented in [Usage Tables for HID Power Devices](https://www.usb.org/sites/default/files/pdcv11.pdf) section 4.2.3 Battery Controls. The total battery charge % reported by Windows appear to be a weighted sum of each battery, weighted by their respective capacities. The Arduino battery is currently harcoded to `iFullChargeCapacity = 100` mWh, which is quite small. It does therefore have a relatively low influence on the total battery charge % on the laptop I've tested on.
…g batteries See abratchik#11 and abratchik#14 for background.
…g batteries See abratchik#11 and abratchik#14 for background.
…g batteries See abratchik#11 and abratchik#14 for background.
This fixes abratchik#11 by also reporting battery capacity percentage on Windows laptops that already has a battery. This makes the sample more interesting to demonstrate. The `CapacityMode` units are documented in [Usage Tables for HID Power Devices](https://www.usb.org/sites/default/files/pdcv11.pdf) section 4.2.3 Battery Controls. The total battery charge % reported by Windows appear to be a weighted sum of each battery, weighted by their respective capacities. The Arduino battery is currently harcoded to `iFullChargeCapacity = 100` mWh, which is quite small. It does therefore have a relatively low influence on the total battery charge % on the laptop I've tested on.
This fixes abratchik#11 by also reporting battery capacity percentage on Windows laptops that already has a battery. This makes the sample more interesting to demonstrate. The `CapacityMode` units are documented in [Usage Tables for HID Power Devices](https://www.usb.org/sites/default/files/pdcv11.pdf) section 4.2.3 Battery Controls. The total battery charge % reported by Windows appear to be a weighted sum of each battery, weighted by their respective capacities. The Arduino battery is currently harcoded to `iFullChargeCapacity = 100` mWh, which is quite small. It does therefore have a relatively low influence on the total battery charge % on the laptop I've tested on.
This fixes abratchik#11 by also reporting battery capacity percentage on Windows laptops that already has a battery. This makes the sample more interesting to demonstrate. The `CapacityMode` units are documented in [Usage Tables for HID Power Devices](https://www.usb.org/sites/default/files/pdcv11.pdf) section 4.2.3 Battery Controls. The total battery charge % reported by Windows appear to be a weighted sum of each battery, weighted by their respective capacities. The Arduino battery is currently harcoded to `iFullChargeCapacity = 100` mWh, which is quite small. It does therefore have a relatively low influence on the total battery charge % on the laptop I've tested on.
This fixes abratchik#11 by also reporting battery capacity percentage on Windows laptops that already has a battery. This makes the sample more interesting to demonstrate. The `CapacityMode` units are documented in [Usage Tables for HID Power Devices](https://www.usb.org/sites/default/files/pdcv11.pdf) section 4.2.3 Battery Controls. The total battery charge % reported by Windows appear to be a weighted sum of each battery, weighted by their respective capacities. The Arduino battery is currently harcoded to `iFullChargeCapacity = 100` mWh, which is quite small. It does therefore have a relatively low influence on the total battery charge % on the laptop I've tested on.
This fixes abratchik#11 by also reporting battery capacity percentage on Windows laptops that already has a battery. This makes the sample more interesting to demonstrate. The `CapacityMode` units are documented in [Usage Tables for HID Power Devices](https://www.usb.org/sites/default/files/pdcv11.pdf) section 4.2.3 Battery Controls. The total battery charge % reported by Windows appear to be a weighted sum of each battery, weighted by their respective capacities. The Arduino battery is currently harcoded to `iFullChargeCapacity = 100` mWh, which is quite small. It does therefore have a relatively low influence on the total battery charge % on the laptop I've tested on. DISCLAIMER: This also changes the DesignedCapacity & FullChargedCapacity reported by Windows from 100 to 361. I don't understand why.
This fixes abratchik#11 by also reporting battery capacity percentage on Windows laptops that already has a battery. This makes the sample more interesting to demonstrate. The `CapacityMode` units are documented in [Usage Tables for HID Power Devices](https://www.usb.org/sites/default/files/pdcv11.pdf) section 4.2.3 Battery Controls. The total battery charge % reported by Windows appear to be a weighted sum of each battery, weighted by their respective capacities. The Arduino battery is currently harcoded to `iFullChargeCapacity = 100` mWh, which is quite small. It does therefore have a relatively low influence on the total battery charge % on the laptop I've tested on. This also implies changing the FullChargeCapacity & DesignCapacity units to AmpSec with 24bit parameter size as documented in the HID Power Device standard.
This fixes abratchik#11 by also reporting battery capacity percentage on Windows laptops that already has a battery. This makes the sample more interesting to demonstrate. The `CapacityMode` units are documented in [Usage Tables for HID Power Devices](https://www.usb.org/sites/default/files/pdcv11.pdf) section 4.2.3 Battery Controls. The total battery charge % reported by Windows appear to be a weighted sum of each battery, weighted by their respective capacities. The Arduino battery is currently harcoded to `iFullChargeCapacity = 100` mWh, which is quite small. It does therefore have a relatively low influence on the total battery charge % on the laptop I've tested on.
This fixes abratchik#11 by also reporting battery capacity percentage on Windows laptops that already has a battery. This makes the sample more interesting to demonstrate. The `CapacityMode` units are documented in [Usage Tables for HID Power Devices](https://www.usb.org/sites/default/files/pdcv11.pdf) section 4.2.3 Battery Controls. The total battery charge % reported by Windows appear to be a weighted sum of each battery, weighted by their respective capacities. The Arduino battery is currently harcoded to `iFullChargeCapacity = 100` mWh, which is quite small. It does therefore have a relatively low influence on the total battery charge % on the laptop I've tested on. This also implies changing the FullChargeCapacity & DesignCapacity units to AmpSec with 24bit parameter size as documented in the HID Power Device standard.
First, thanks a lot for sharing this project!
I noticed that the Arduino device always shows up as a battery with 0% charge when testing in Windows on a laptop that already has a battery.
Work-around
It appear to be possible to work around this problem by disabling the real battery device in Device Manager:
The remaining Arduino battery then afterwards shows up with correct charge:
ASK: It would be great if the device could show up with correct charge also on multi-battery setups. I'm not sure, but have a feeling that this can be achieved by tweaking some HID parameters.
The text was updated successfully, but these errors were encountered: