WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Battery monitor or icon?  (Read 6402 times)

Offline 0day

  • WikiUser
  • *
  • Posts: 5
Battery monitor or icon?
« on: April 18, 2017, 08:04:37 AM »
A battery indicator for tiny core?

Online bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7015
    • My Community Forum
Re: Battery monitor or icon?
« Reply #1 on: April 18, 2017, 08:17:24 AM »
A battery indicator for tiny core?

Check your desktop plugins. In general there are no such thing that Tiny Core icon :(

Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 11065
Re: Battery monitor or icon?
« Reply #2 on: April 18, 2017, 08:47:46 AM »
there's the watcher extension

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1703
Re: Battery monitor or icon?
« Reply #3 on: April 18, 2017, 09:40:10 AM »
Or Conky.
Download a copy and keep it handy: Core book ;)

Offline h2sammo

  • Jr. Member
  • **
  • Posts: 80
    • Best podcast on LI-ion
Re: Battery monitor or icon?
« Reply #4 on: January 26, 2019, 03:22:57 AM »
i installed watcher but no battery monitor. just %C, %M and %S
Thank you for your help!

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 11065
Re: Battery monitor or icon?
« Reply #5 on: January 26, 2019, 04:03:59 AM »
It looks like there's a patch pending:

http://forum.tinycorelinux.net/index.php/topic,21360.msg133540.html#msg133540

..but the %m, and presumeably %s, part works for me.
« Last Edit: January 26, 2019, 04:06:01 AM by Juanito »

Offline NewUser

  • Jr. Member
  • **
  • Posts: 86
Re: Battery monitor or icon?
« Reply #6 on: January 28, 2019, 11:18:36 PM »
I use flit. I serves my needs, and takes little desktop space. 32-bit only, though.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 11065
Re: Battery monitor or icon?
« Reply #7 on: January 29, 2019, 01:01:59 AM »
flit added to CorePure64 repo

Edit: and recompiled for fltk-1.1.0 -> fltk-1.3 in Core repo
« Last Edit: January 29, 2019, 03:11:00 AM by Juanito »

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6903
Re: Battery monitor or icon?
« Reply #8 on: January 29, 2019, 01:30:52 PM »
Hi h2sammo
i installed watcher but no battery monitor. just %C, %M and %S

It looks like there's a patch pending:

http://forum.tinycorelinux.net/index.php/topic,21360.msg133540.html#msg133540

..but the %m, and presumeably %s, part works for me.

I did some checking and it seems my patch was applied to the source code but the repo was never updated. I confirmed
this by examining the executable that's currently in the repo.  I did some minor cleanup and recompiled the program. A new
package has been submitted and will be available as soon as the repo is updated.

Offline NewUser

  • Jr. Member
  • **
  • Posts: 86
Re: Battery monitor or icon?
« Reply #9 on: January 29, 2019, 09:07:21 PM »
flit added to CorePure64 repo

Edit: and recompiled for fltk-1.1.0 -> fltk-1.3 in Core repo
Thank you Juanito. Looks like I'll be going 64-bit.

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 11065
Re: Battery monitor or icon?
« Reply #10 on: January 29, 2019, 09:50:07 PM »
updated watcher posted - thanks

On my machine (dell e7240) running tc-10.x, I get this:
Code: [Select]
$ ls /sys/class/power_supply/BAT0
alarm               current_now         present             uevent
capacity            cycle_count         serial_number       voltage_min_design
capacity_level      device              status              voltage_now
charge_full         manufacturer        subsystem
charge_full_design  model_name          technology
charge_now          power/              type

..and:
Code: [Select]
$ ls /sys/class/power_supply/AC
device     online     power/     subsystem  type       uevent

It looks like watcher is calculating C% from either charge_now or energy_now divided by either charge_full or energy_full.

I get 1742000/2457000=71%, but the watcher display varies slowly between 6.7% and 7.2% - i.e. a factor of 10 out?

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6903
Re: Battery monitor or icon?
« Reply #11 on: January 29, 2019, 10:30:55 PM »
Hi Juanito
The calculation code looks correct:
Code: [Select]
sprintf(batmsg, " %.1f%%B", (float)(batnow / batfull) * 100);
BAT0  looks like the correct value to pass to watcher.

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6903
Re: Battery monitor or icon?
« Reply #12 on: January 29, 2019, 10:44:38 PM »
Hi Juanito
Quote
... It looks like watcher is calculating C% from either charge_now or energy_now divided by either charge_full or energy_full. ...
You mean %B. %C is the CPU. Did you start watcher like this:
Code: [Select]
watcher -bat BAT0to tell it where to find the battery?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 11065
Re: Battery monitor or icon?
« Reply #13 on: January 29, 2019, 10:53:26 PM »
doh  :-[

It works now (and matches flit) - thanks

..but constantly repeats this to stdout:
Code: [Select]
$ ./watcher -bat BAT0
Error opening batinfo /sys/class/power_supply/BAT0/energy_now
Error opening batinfo /sys/class/power_supply/BAT0/energy_full

Offline Rich

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 6903
Re: Battery monitor or icon?
« Reply #14 on: January 29, 2019, 11:00:45 PM »
Hi Juanito
Maybe I should remove that error message? It seemed like a good idea at the time but it really isn't an error unless the
fallback values (charge_now and charge_full) can't be read. It's late here but if you'd like I'll clean up the error handling
and submit an update tomorrow.