Commit Graph

421 Commits

Author SHA1 Message Date
Carsten Haitzler e09e75062d battery - work on pinephone.
it's a ... simpler battery.
2021-04-14 16:13:42 +00:00
Carsten Haitzler 17c2d33a32 battery - handle missing vendor, model, invalikd lifespan capacity etc 2021-04-14 00:04:59 +01:00
Carsten Haitzler 484c9f5818 e - module icons ... the great flattening begins... (partly done)
did a chunk of the module icons, but not all. it now matches flat.
2021-04-05 23:45:47 +01:00
Carsten Haitzler 4deaeaad20 mod battery config icon- fix to use from theme 2021-03-28 22:29:48 +01:00
Carsten Haitzler f158ffbe93 emit signals for ac on/off explicitly to battery gad 2021-03-18 11:21:31 +00:00
Carsten Haitzler 09e4f2f8b5 bat popup - match gadget content better 2021-03-14 11:51:58 +00:00
Carsten Haitzler fec75537b6 battery - polish popup list item content 2021-03-13 23:06:35 +00:00
Alastair Poole 5d19ae6a5b battery: missed that.
Bad.
2021-03-11 11:50:56 +00:00
Alastair Poole a6b870266c bat: status entry scroll. 2021-03-09 20:29:31 +00:00
Alastair Poole 3e1b41ab44 battery: OpenBSD > 1 battery. 2021-03-09 14:30:49 +00:00
Alastair Poole b593fb0bfa battery: no popup with 0 units. 2021-03-08 13:18:48 +00:00
Alastair Poole c9f1d254ca battery: padding.
enough for now.
2021-03-08 12:49:23 +00:00
Alastair Poole 57d7419a28 battery: fix warning. 2021-03-08 12:35:53 +00:00
Alastair Poole d046bc5268 battery: cleaner popup ui 2021-03-08 12:27:01 +00:00
Alastair Poole 39b7896df5 battery: fix sysctl battery update and naming. 2021-03-07 20:21:12 +00:00
Alastair Poole 1e4eb55816 battery: popup text. 2021-03-07 19:49:40 +00:00
Alastair Poole 9ab00c598b battery: WiP RFC.
How many instances do we need? I'd argue one, or once one poller.
If this is a problem let me know...
2021-03-07 19:18:17 +00:00
Alastair Poole 945697ba0a battery: FreeBSD multiple batteries.
model/vendor/tech support. Some indentation to make the BSD
support easier to read and distinguish. Pleas test.
2021-03-07 16:23:50 +00:00
Alastair Poole a4630c0679 battery: > 1 battery popup. 2021-03-07 12:46:42 +00:00
Carsten Haitzler 5a97e2c4e7 battery - dont show low battery alert if we have >= 15% battery
saves edge cases creating warnings;
2020-12-02 23:04:58 +00:00
Alastair Poole 16bb8e7bd7 battery: Add Rudimentary Popup.
Add a popup for battery. It will update if left visible. The popup
avoids polling by using a slightly delayed copy of the battery
state stored in config struct.
2020-08-29 16:20:54 +01:00
Alastair Poole 1fa239b404 battery: OpenBSD use proper constants.
Not a workaround, we can be AMP or WATT hour.
2020-07-09 01:11:31 +01:00
Elyes HAOUAS f47d1a789e tree-wide: get rid of trailing whitespace (part 6)
Remove trailing whitespaces

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11825
2020-05-14 13:49:18 +02:00
Elyes HAOUAS 153f479d3f tree-wide: fix typos all over the place
Fix some typos

Differential Revision: https://phab.enlightenment.org/D11778
2020-05-14 12:04:51 +02:00
Alastair Poole 6b70114c6d battery/batman: Various Improvements.
This adds support for multiple batteries on FreeBSD in line with
Linux and OpenBSD. Also display the vendor and model where
applicable. There are also fixes specific to the sysctl interface.
Fixes a potential crash and let's us have 100 batman gadgets if
wanted.
2019-11-30 20:46:09 +00:00
thierryOrdissimo fff3f69114 Update of the dbus calls of the upower module.
Reviewers: zmike, devilhorns, stephenmhouston

Reviewed By: zmike, stephenmhouston

Subscribers: cedric

Tags: #enlightenment-git

Differential Revision: https://phab.enlightenment.org/D6386
2018-08-08 09:17:08 -05:00
Daniel Zaoui 49459b6b72 Battery: fix the battery status when some battery devices are not valid
It happens that some devices are considered as batteries, even if they
cannot be charged or used as a power supply for the laptop.
The ELAN device deals with the touchpad and is a "battery". When looking
at the udev info, it appears that there is no technology present as
well as the basic battery info (energy levels).

P: /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN24CC:00/0018:04F3:24CC.0003/power_supply/hid-0018:04F3:24CC.0003-battery
E: DEVPATH=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-ELAN24CC:00/0018:04F3:24CC.0003/power_supply/hid-0018:04F3:24CC.0003-battery
E: POWER_SUPPLY_CAPACITY=1
E: POWER_SUPPLY_MODEL_NAME=ELAN24CC:00 04F3:24CC
E: POWER_SUPPLY_NAME=hid-0018:04F3:24CC.0003-battery
E: POWER_SUPPLY_ONLINE=1
E: POWER_SUPPLY_PRESENT=1
E: POWER_SUPPLY_SCOPE=Device
E: POWER_SUPPLY_STATUS=Discharging
E: SUBSYSTEM=power_supply

The issue with that kind of devices is that it confuses the battery
gadget. Since two batteries are present, the total capacity is divided
by 2, resulting in the gadget displaying only 50% when the battery is
fully charged.
To avoid this, we check that the battery technology is known.

@fix
2018-06-05 00:30:47 +03:00
Ross Vandegrift 629f7d41c8 clean up .desktop files and misc typos
Summary:
Drop deprecated Encoding key from desktop files

The Encoding key is no longer required, all desktop files are assumed to
be UTF-8 encoded.  See details at:
https://standards.freedesktop.org/desktop-entry-spec/1.1/apc.html

Fix various typos and misspellings

lintian, Debian's package checker, uses strings to check for common typos
in compiled binaries.  This change fixes the ones it identified in 0.22.1.

Reviewers: zmike!

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5585
2018-01-04 09:57:52 -05:00
Mike Blumenkrantz bd88282047 remove autotools 2017-11-20 07:05:36 -05:00
Mike Blumenkrantz 59fa0e418d use E_BITFIELD define for bitfield struct members
on release builds this will be a bitfield, on devel builds it will make
bools a normal unsigned char for easier debugging
2017-11-07 10:39:56 -05:00
Carsten Haitzler 929037aaa0 battery modules - actually set ac power flag based on ac presence
this should fix T3649

@fix
2017-10-18 13:32:50 +09:00
Al Poole dece94b6ca battery: fix typo.
Summary: Missed this one. Apologies!

Reviewers: zmike!

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5135
2017-08-29 09:18:42 -04:00
Al Poole 7df7b1f5fa FreeBSD: fix broken build.
Reviewers: zmike!, raster

Reviewed By: raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5092
2017-08-12 10:49:38 +09:00
Carsten Haitzler 16a702ac73 meson - make modules with helper binaries simpelr to build
this makes modules with a binary helper simpler to build using the
parent module build harness as much as possible. i probably could
simplify this down to a single binary only and it is either setuid or
not... define the deps and flags ... it could be a bit simpler. not
much. i also removed the if's in the build for battery and ifdefs in
src handle it instead (imho simpler to maintain in src). sysinfo still
uses the if's there.
2017-08-11 19:50:48 +09:00
Carsten Haitzler 3fd90549b4 batget - fix warnings about buffer sizes
not an actual bug but too much warning noise.
2017-08-04 14:53:30 +09:00
Mike Blumenkrantz e8dc71cd48 meson. 2017-07-20 17:18:33 -04:00
Mike Blumenkrantz b0e13c8ca4 do not include e.h in batget.c 2017-07-20 17:18:33 -04:00
Al 'netstar' Poole d7538011ec Modules: Fix compilation and remove warnings for BSD 2017-07-15 21:32:11 -05:00
Mike Blumenkrantz b7e8e886e9 do not generate module.desktop files
the purpose of this is to allow variable substitutions, but no desktop
files do this so it's a waste of build time for no reason
2017-07-14 18:40:50 -04:00
Mike Blumenkrantz 1fe4555d7b remove eeze init/shutdown calls from modules
this is unnecessary and was done with mismatched init/shutdowns in some cases
2017-06-30 10:25:17 -04:00
Derek Foreman 73aecd73ab Replace all timer_add with timer_loop_add
So yeah, I've literally used sed to replace every occurrence of
ecore_time_add() with ecore_timer_loop_add() because I'm reasonably
confident that no part of E has a legitimate need for timer based on the
exact current time.

It would be really nice if I'm not wrong. :)

The reason for this is the incredible spew of clock_gettime() calls I'm
seeing on an ARM system (that should have a vdso for gettime, but...)
This can amount to thousands of system calls per second.

 #YOLO
2017-02-03 15:52:28 -06:00
Al Poole 55a7d4feed Fixes issues w/battery and batman living together
Summary:
The problems were that both sysctl implementations defined public accessable fields named bat.

The static definition moves into the file scopes.

The E_FREE calls are fixing a use after free.

Reviewers: zmike!, bu5hm4n

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4629
2017-01-29 12:47:15 +01:00
Al 'netstar' Poole 2f218a1694 Enlightenment - BSD - Fix typos in battery sysctl float compares. 2017-01-27 19:08:14 -06:00
Al 'netstar' Poole 82af16c32b Enlightenment - BSD - Cleanup sysctl code for batteries. 2017-01-27 18:28:19 -06:00
Carsten Haitzler 3903d44666 e - BLOODY BUILD AGAIN - DAMN FLOAT WARNINGS...
i swear ... all of this shit over a warning that CAUSED more bugs than
it eveer fixed? sersiously...

ARGH!
2017-01-07 14:05:17 +09:00
Stephen 'Okra' Houston 501ea95e2c E gadgets: Prepare for sysinfo to arrive. 2017-01-06 16:16:51 -06:00
Mike Blumenkrantz 49776abae3 resolve battery float-equal warnings
Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
2017-01-06 12:57:33 -05:00
Al Poole b4f3a8da0a Enlightenment: Factor all sysctl battery code for bsd into e_mod_sysctl.c
This commit should now allow battery to support OpenBSD, FreeBSD, Dragonfly BSD, and NetBSD
2016-12-09 11:02:43 -06:00
Al Poole 4f1f29ae35 fix openbsd battery calc on amd64 2016-06-09 11:15:09 -04:00
Mike Blumenkrantz 1098abfb6e use snprintf for string handling in batget
CID 1039801
2016-03-22 15:10:50 -04:00