Giter Site home page Giter Site logo

Comments (5)

darshan- avatar darshan- commented on June 20, 2024

Hi,

On devices that support it, the Pro version includes a "current hack" (I call it a hack because it's not officially supported by Android, it bypasses Android to get the information, and it works on many devices, but far from all devices) that shows this information.

from battery-indicator-support.

robinpaulson avatar robinpaulson commented on June 20, 2024

Ah, I think we're talking about different things. I have the current hack enabled already, but that only shows the current flow into the battery from an external power source. At the same time as the battery is charging, the phone is also discharging it. I'd like to know that rate, the current going from battery to phone. I might draw a circuit diagram if necessary.

from battery-indicator-support.

darshan- avatar darshan- commented on June 20, 2024

Ah, I think I understand.

My understanding of the value used is that it represents the net current to/from the battery. I don't believe Linux exposes (nor probably can detect on typical devices) current specifically from battery to phone while charging. (While off the charger, of course what you see is from battery to phone.) If you find any way to do this, I'm certainly into the idea of exposing it in the app! It'd be cool to show charger-to-battery and battery-to-device current separately.

from battery-indicator-support.

robinpaulson avatar robinpaulson commented on June 20, 2024

I didn't realise it was net drain, it always seems so stable after the first few seconds. I might look up kernel docs to find out. Any suggestions where to start? Kernel.org perhaps?

from battery-indicator-support.

darshan- avatar darshan- commented on June 20, 2024

It's certainly possible it works differently on different devices. But I believe the intention and the normal use case is net current.

This might be a starting off point:

https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-power

And then look at the kernel source for your device to be sure what's going on when the app reads /sys/class/power_supply/<supply_name>/current_now.

from battery-indicator-support.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.