1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-03 02:06:21 +02:00
Gadgetbridge/app/src/main/java/nodomain/freeyourgadget/gadgetbridge
MrYoranimo b902ee96c3 Xiaomi: improve battery level and charger status processing
Because the reporting of battery state is inconsistent between different
models, the device's battery state was not correctly processed in GB.

For at least the firmware on the Xiaomi Watch S1 Active, the charger
state is broadcast through a separate message from the message
containing the battery level. Even though the battery level was
requested by GB upon receiving this broadcast, the charger state got
discarded as it was expected to also be included in the result of the
subsequent request.

This patch changes the name of the `Charger` message to `DeviceState`
and includes more fields that may be presented by some device models.
Furthemore, the broadcast is cached so that the charger state can be
processed from this cache instead of the battery level response message.
2023-12-06 11:56:13 +01:00
..
activities Xiaomi: Use display items labels from watch 2023-12-05 18:20:02 +00:00
adapter Device Management: centralized DeviceType resolution cache 2023-10-29 13:45:48 +00:00
capabilities Replace old-style preference switch with Material 3 switch 2023-10-09 09:53:36 +02:00
contentprovider
database Device management: store deviceType name in DB 2023-10-27 19:14:49 +00:00
deviceevents Bangle.js: Handle fw and hw versions 2023-08-09 09:09:52 +01:00
devices Xiaomi: Use display items labels from watch 2023-12-05 18:20:02 +00:00
entities Support for Femometer Vinca 2 and HealthThermometerProfile (#3369) 2023-10-15 13:37:41 +00:00
export Zepp OS: Start new GPX segments on pause/resume 2023-05-14 16:22:32 +01:00
externalevents Xiaomi: Cleanup code and comments 2023-11-25 22:18:34 +00:00
impl Device Management: centralized DeviceType resolution cache 2023-10-29 13:45:48 +00:00
model Mi Watch Color Sport: Experimental support 2023-12-02 11:56:23 +00:00
service Xiaomi: improve battery level and charger status processing 2023-12-06 11:56:13 +01:00
util Improve ASCII transliterator 2023-11-28 18:24:42 +00:00
GBApplication.java Refactor known preference values code to be reusable 2023-12-05 18:20:02 +00:00
GBEnvironment.java
GBException.java
LockHandler.java
Logging.java Amazfit GTR 4: Initial support 2022-10-22 22:03:49 +02:00
LoggingExceptionHandler.java
SleepAlarmWidget.java Bangle.js: Bump flavor targetSdkVersion to 31 2023-05-30 00:25:20 +02:00
Widget.java Generalize charts logic for non-activity data 2023-06-16 23:53:28 +01:00