From: RSmirnov512 <noreply@github.com>
To: linux-bluetooth@vger.kernel.org
Subject: [bluez/bluez] c4c1a7: battery: improve the display of the charge level
Date: Tue, 28 Oct 2025 07:49:30 -0700 [thread overview]
Message-ID: <bluez/bluez/push/refs/heads/1016771/000000-c4c1a7@github.com> (raw)
Branch: refs/heads/1016771
Home: https://github.com/bluez/bluez
Commit: c4c1a72f2470a0d0cd51281214eb0e2569bc4074
https://github.com/bluez/bluez/commit/c4c1a72f2470a0d0cd51281214eb0e2569bc4074
Author: Roman Smirnov <r.smirnov@omp.ru>
Date: 2025-10-28 (Tue, 28 Oct 2025)
Changed paths:
M src/battery.c
Log Message:
-----------
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
To unsubscribe from these emails, change your notification settings at https://github.com/bluez/bluez/settings/notifications
reply other threads:[~2025-10-28 14:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bluez/bluez/push/refs/heads/1016771/000000-c4c1a7@github.com \
--to=noreply@github.com \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).