* [bluez/bluez] 0281f3: shared/battery: improve the display of the charge ...
@ 2025-11-01 11:59 RSmirnov512
0 siblings, 0 replies; only message in thread
From: RSmirnov512 @ 2025-11-01 11:59 UTC (permalink / raw)
To: linux-bluetooth
Branch: refs/heads/1018486
Home: https://github.com/bluez/bluez
Commit: 0281f3d75bcb1ed9878d54c94c560dc65c508b3d
https://github.com/bluez/bluez/commit/0281f3d75bcb1ed9878d54c94c560dc65c508b3d
Author: Roman Smirnov <r.smirnov@omp.ru>
Date: 2025-11-01 (Sat, 01 Nov 2025)
Changed paths:
M Makefile.am
M src/battery.c
A src/shared/battery.c
A src/shared/battery.h
Log Message:
-----------
shared/battery: improve the display of the charge level
The battery charge level may fluctuate due to uncalibrated
sensors. Commit smooths out such fluctuations.
The algorithm for determining uncalibrated sensors consists of
finding the number of changes in charge direction (i.e., "spikes").
If the number of spikes is zero, the device is charging or discharging.
If there is one spike, it may mean that the device has started charging
or has been disconnected from charging. If there are two or more spikes,
this is a clear indication of an uncalibrated sensor.
Check that the battery charge is fluctuating. If the battery charge
is fluctuating, use the average charge value, otherwise use the current
value.
Fixes: https://github.com/bluez/bluez/issues/1612
Commit: f507f63d6e63a165f6d2389822f5b40ee9be83f4
https://github.com/bluez/bluez/commit/f507f63d6e63a165f6d2389822f5b40ee9be83f4
Author: Roman Smirnov <r.smirnov@omp.ru>
Date: 2025-11-01 (Sat, 01 Nov 2025)
Changed paths:
M .gitignore
M Makefile.am
M doc/test-coverage.txt
A unit/test-battery.c
Log Message:
-----------
unit: Add basic unit tests for battery charge handling
Compare: https://github.com/bluez/bluez/compare/0281f3d75bcb%5E...f507f63d6e63
To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-01 11:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-01 11:59 [bluez/bluez] 0281f3: shared/battery: improve the display of the charge RSmirnov512
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).