Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.mobile.android > #33473

Re: How does an app estimate charging current?

From Nigel Wade <nmw@local.domain>
Newsgroups comp.mobile.android
Subject Re: How does an app estimate charging current?
Date 2016-08-17 15:50 +0100
Message-ID <e1jbu9FdeccU1@mid.individual.net> (permalink)
References <nor8g4$jh1$1@gioia.aioe.org> <nosdg8$dku$3@dont-email.me> <nosr4m$1gk$1@dont-email.me> <nou7ct$gtd$1@gioia.aioe.org>

Show all headers | View raw


On 16/08/16 06:13, Aardvarks wrote:
> I can "see" that file by opening up the Android terminal emulator to type:
> cd/sys/class/power_supply/battery/
> ...
> cat current_now (No such file or directory)
> cat current_avg (0)
> cat current_max (No such file or directory)
> ...
> ls batt* (lots of stuff)
>
> I think all the current apps just read one or more of those files.
> But HOW does the current get*into*  those files?

/sys is a pseudo-filesystem which provides direct hooks into the kernel device drivers.
The "files" are not actual files, and when you read from them you are actually reading the kernel/device driver data structures directly.

So, nothing actually writes any values into /sys/class/power_supply/battery/

Back to comp.mobile.android | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

How does an app estimate charging current? Aardvarks <aardvarks@a.b.c.com> - 2016-08-15 02:13 +0000
  Re: How does an app estimate charging current? crankypuss <undisclosedUserid@gmail.com> - 2016-08-15 06:31 -0600
    Re: How does an app estimate charging current? David Taylor <david-taylor@blueyonder.co.uk.invalid> - 2016-08-15 17:37 +0100
      Re: How does an app estimate charging current? Aardvarks <aardvarks@a.b.c.com> - 2016-08-16 05:13 +0000
        Re: How does an app estimate charging current? crankypuss <undisclosedUserid@gmail.com> - 2016-08-16 05:28 -0600
          Re: How does an app estimate charging current? Aardvarks <aardvarks@a.b.c.com> - 2016-08-16 13:43 +0000
            Re: How does an app estimate charging current? crankypuss <undisclosedUserid@gmail.com> - 2016-08-17 04:59 -0600
        Re: How does an app estimate charging current? David Taylor <david-taylor@blueyonder.co.uk.invalid> - 2016-08-16 17:07 +0100
        Re: How does an app estimate charging current? Nigel Wade <nmw@local.domain> - 2016-08-17 15:50 +0100
          Re: How does an app estimate charging current? Aardvarks <aardvarks@a.b.c.com> - 2016-08-17 17:12 +0000
      Re: How does an app estimate charging current? crankypuss <undisclosedUserid@gmail.com> - 2016-08-16 05:22 -0600
        Re: How does an app estimate charging current? pamela <invalid@nospam.com> - 2016-08-16 21:07 +0100

csiph-web