1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-05 00:12:56 +01:00
Commit Graph

11039 Commits

Author SHA1 Message Date
Daniele Gobbetti
14c6ce1a3a Garmin protocol: store max packet size from DeviceInformationMessage
also adds messageType to the warnifleftover log message
2024-05-24 22:24:07 +02:00
Daniele Gobbetti
6cb5184e2b Garmin protocol: various changes
- add FitFile class that deals with parsing and generating outgoing files
- consider all field definitions with number 253 as Timestamps [0]
- add support for "compressed timestamps" in fit file parsing. Those are not returned among the other normal fields but are available through a method of RecordData
- adjust the test cases

[0]48b6554d8a/fitdecode/reader.py (L719)
2024-05-24 22:24:07 +02:00
Daniele Gobbetti
e814a63590 Garmin protocol: change naming and logic of several FIT classes
- refactor the logic of Global and Local messages
- add some Global messages with naming taken from [1]
- Global messages are not enum because there are too many
- introduce the concept of FieldDefinitionPrimitive
- add new Field Definitions
- add support for developer fields and array fields
- add test case for FIT files taken from [0]

[0] https://github.com/polyvertex/fitdecode/
[1] https://www.fitfileviewer.com/
2024-05-24 22:24:07 +02:00
Daniele Gobbetti
b2f995b736 Garmin protocol: create helper class GarminByteBufferReader
separate the logic specific for GFDI messages from the generally useful logic.
Also centralize the logging in case of leftover bytes while parsing GFDI messages.
2024-05-24 22:24:07 +02:00
Daniele Gobbetti
8524426b70 Garmin protocol: create custom GBDeviceEvent for weather request 2024-05-24 22:24:07 +02:00
Daniele Gobbetti
4054326535 Garmin protocol: use message enum instead of id in GFDI Messages 2024-05-24 22:24:07 +02:00
Daniele Gobbetti
c8c51064c3 Garmin protocol: refactoring and fixes of BaseTypes
The boundaries are enforced on the stored value when decoding, before applying the adjustments for scale and offset.
Also add some tests for the BaseTypes
Introduce new FieldDefinition for Temperature and WeatherCondition (removing the static class)
Add accessors for field data in the containing RecordData, thus keeping the FieldData private
2024-05-24 22:24:07 +02:00
Daniele Gobbetti
71f497ecbb Garmin protocol: create specific field definition for day of week 2024-05-24 22:24:07 +02:00
Daniele Gobbetti
e323e7fbde Garmin protocol: move field encode/decode interface to the FieldDefinition
This allows for semantic subclassing the FieldDefinition.
A FieldDefinitionTimestamp subclass is introduced as example
2024-05-24 22:24:07 +02:00
Daniele Gobbetti
4313fc833a Garmin protocol: fix invalid signed int base type value 2024-05-24 22:24:07 +02:00
Daniele Gobbetti
e691042265 Garmin protocol: add initial support for FIT messages
note: only weather message definition and data tested so far
also enable weather support for Instinct 2S and vivomove style
also cleanup some unused constants that have been migrated to new enums in GFDIMessage
additionally switch to new local implementation of GarminTimeUtils with needed methods
2024-05-24 22:24:07 +02:00
Daniele Gobbetti
afe41ee563 Garmin protocol: fixes
- fix DEVICE_SETTINGS message ID
- put all status messages in own package
- allow protobuf handler to change the returned status message to signal unsupported requests
- fix various bugs
2024-05-24 22:24:07 +02:00
Daniele Gobbetti
559a73cc5e Garmin protocol: initial refactoring and basic functionalities
This commit takes aims to bring many new garmin devices up to a working status, with basic functionalities such as:
- garmin protocol initialization
- basic message exchange
- support for some messages in Garmin own format
- support for some messages in protobuf format
2024-05-24 22:24:07 +02:00
Gordon Williams
7ea2261ba3 Bangle.js: honour the enable_calendar_sync setting
Allow handleCalendarSync to send a single `calendar-` command with all IDs before it starts adding new items (faster)
2024-05-24 09:26:37 +01:00
Gordon Williams
4da5a73cd6 Bangle.js - remove large lines of _____ from calendar (generated by google teams) 2024-05-23 09:48:37 +01:00
MrYoranimo
4edea1ed96 Huami: fix reminder message encoding
Potentially fixes #3548
2024-05-19 15:13:23 +00:00
José Rebelo
78c10c3da9 Amazfit Bip 5 Unity: Experimental support (untested) 2024-05-18 13:12:51 +01:00
Vitaliy Tomin
8946eff8fa Huawei: Set user info to device
* height
* weight
* age
* year of birth
* gender
2024-05-16 17:52:51 +00:00
Daniele Gobbetti
9c68acce2e Add support for exclusive audio focus
This pauses temporarily other apps that are playing sound while our notifications get spoken.
2024-05-14 16:06:03 +02:00
Martin.JM
9ba96231c3 [Huawei] Implement remote camera shutter 2024-05-13 21:28:43 +00:00
Martin.JM
4c4ba623c4 Add camera implementation
This is to support watches with remote shutter applets that do not
act as remote triggers for other apps automatically.
2024-05-13 21:28:43 +00:00
Arjan Schrijver
d9863786de Dashboard: Use more intuitive time markings in today widget
Fixes #3717
2024-05-13 21:07:43 +02:00
Daniel Dakhno
3b01422a45 device-cycling-sensor (#3705)
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3705
Co-authored-by: Daniel Dakhno <dakhnod@gmail.com>
Co-committed-by: Daniel Dakhno <dakhnod@gmail.com>
2024-05-10 20:43:45 +00:00
Martin.JM
25b1f8f3fa [Huawei] Change to use MediaManager 2024-05-09 20:03:36 +02:00
José Rebelo
b909e123a4 Huawei Band 9: Fix device name 2024-05-08 22:49:57 +01:00
Damien 'Psolyca' Gaignon
39ea1774a4 [Huawei] Add Huawei Band 9 gadget 2024-05-08 21:49:12 +00:00
Damien 'Psolyca' Gaignon
f2c360ae8a [Huawei] Add Huawei Watch Fit 3 gadget 2024-05-08 21:49:12 +00:00
José Rebelo
41aab5135f Fossil Q Hybrid: Migrate global preferences to device-specific 2024-05-08 21:42:29 +00:00
Damien 'Psolyca' Gaignon
690d01dcac
[Huawei] Remove unneeded data 2024-05-08 22:48:47 +02:00
Damien 'Psolyca' Gaignon
02b052fcaf
[Huawei] Add Huawei Watch 4 Pro gadget
fix
2024-05-08 22:48:46 +02:00
ahormann
ac8d1ed6a0 New Device Soundcore Liberty 3 Pro (#3753)
Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3753
Co-authored-by: ahormann <ahormann@gmx.net>
Co-committed-by: ahormann <ahormann@gmx.net>
2024-05-07 22:39:13 +00:00
MrYoranimo
508a86b8ed Xiaomi: fix determining fall asleep time
Because the previous implementation of determining the time the user
falls asleep in a given time range would take the 24 hours in advance
into account, graphs displaying sleep data would erroneously indicate
that the user has been asleep since the start of the timeframe if
the user was asleep during the rollover of the time frame 24 hours
before.

This commit change the algorithm to only fetch the last sleep stage
sample and sleep range sample from the database that occurred before
the given time range. This saves having to process 24 hours worth of
samples before the time range in both cases, and prevents taking into
account irrelevant sleep ranges.
2024-05-07 13:33:52 +02:00
MrYoranimo
f581d57c01 Xiaomi: fix sleep stages not getting parsed from sleep details files
Not all packets use the payload length byte/short for the payload
length. Instead, some packets do not carry a payload, in which case
the payload length bytes are assumed to represent some state or flag.
Therefore, for packets with a type known not to carry a payload, the
payload extraction is skipped, allowing other packets to get
successfully parsed again.
2024-05-07 13:17:10 +02:00
José Rebelo
bed67ef1fb Xiaomi: Allow transliteration 2024-05-05 12:36:23 +01:00
José Rebelo
04237b7727 Prevent query for devices that have activity card disabled
Even if the activity card was disabled, all devices would be queried for
data. This slows down the UI when there are a lot of devices, especially
if multiple of them have data and only a few have the card enabled.
2024-05-04 23:51:19 +01:00
Alik Aslanyan
dc1ffdafcd Rework Armenian transliteration to handle more edge cases around mixed letters 2024-05-04 20:45:35 +04:00
José Rebelo
eaf7c03f61 Galaxy Buds 2: Fix recognition of some versions 2024-05-04 11:06:07 +01:00
José Rebelo
7892afa304 Xiaomi: Fix barometer
Thanks to MrYoranimo for the fix.
2024-05-03 22:27:57 +01:00
Martin.JM
4c93647aaf [Huawei] Add TruSleep warning 2024-05-02 20:59:08 +02:00
José Rebelo
881e8e36e8 Update changelog 2024-05-01 23:35:04 +01:00
José Rebelo
0ff8774fce DebugActivity: Omit manufacturer for test devices if name contains it 2024-05-01 23:34:14 +01:00
rymut
7a50df61b8 [Huawei] refactor: removed isExperimental override 2024-05-01 22:35:12 +02:00
rymut
8860b4b678 [Huawei] fix: use correct coordinator for watch fit 2 2024-05-01 22:24:36 +02:00
Nyatsuki
b8852379f9
Translated using Weblate (Japanese)
Currently translated at 54.7% (1500 of 2739 strings)

Co-authored-by: Nyatsuki <Odamaki@yandex.ru>
Translate-URL: https://hosted.weblate.org/projects/freeyourgadget/gadgetbridge/ja/
Translation: Freeyourgadget/Gadgetbridge
2024-05-01 18:34:03 +02:00
Baka Gaijin
07a11addb9
Translated using Weblate (Japanese)
Currently translated at 54.6% (1494 of 2735 strings)

Co-authored-by: Baka Gaijin <lewdwarrior@waifu.club>
Translate-URL: https://hosted.weblate.org/projects/freeyourgadget/gadgetbridge/ja/
Translation: Freeyourgadget/Gadgetbridge
2024-05-01 18:34:02 +02:00
あぽろあぽろ
4dde33c342
Translated using Weblate (Japanese)
Currently translated at 54.6% (1494 of 2735 strings)

Co-authored-by: あぽろあぽろ <aporotilyoko0000@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/freeyourgadget/gadgetbridge/ja/
Translation: Freeyourgadget/Gadgetbridge
2024-05-01 18:34:00 +02:00
Deleted User
294adf6da5
Translated using Weblate (Portuguese (Brazil))
Currently translated at 52.3% (1432 of 2735 strings)

Co-authored-by: Deleted User <Resume7202@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/freeyourgadget/gadgetbridge/pt_BR/
Translation: Freeyourgadget/Gadgetbridge
2024-05-01 18:33:59 +02:00
José Rebelo
5c7ea9131e
Translated using Weblate (Russian)
Currently translated at 94.8% (2589 of 2731 strings)

Co-authored-by: José Rebelo <joserebelo@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/freeyourgadget/gadgetbridge/ru/
Translation: Freeyourgadget/Gadgetbridge
2024-05-01 18:33:57 +02:00
0que
27fa1a94fe
Translated using Weblate (Russian)
Currently translated at 94.8% (2592 of 2734 strings)

Translated using Weblate (Russian)

Currently translated at 94.8% (2589 of 2731 strings)

Co-authored-by: 0que <0que@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/freeyourgadget/gadgetbridge/ru/
Translation: Freeyourgadget/Gadgetbridge
2024-05-01 18:33:56 +02:00
summoner001
80857758b4
Translated using Weblate (Hungarian)
Currently translated at 84.2% (2287 of 2716 strings)

Co-authored-by: summoner001 <summoner@vivaldi.net>
Translate-URL: https://hosted.weblate.org/projects/freeyourgadget/gadgetbridge/hu/
Translation: Freeyourgadget/Gadgetbridge
2024-05-01 18:33:54 +02:00