1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-18 16:09:30 +01:00
Commit Graph

10830 Commits

Author SHA1 Message Date
Daniele Gobbetti
a7d4f3df93 Garmin: Add support for custom replies (notifications and calls)
To enable custom replies an override must be defined in the devices coordinator that actually support custom replies.

The custom preferences allow to:
- enable / disable the default message suffix (Instinct 2 appends "sent from my $vendor device" to each reply by default)
- define custom messages to reply to calls and incoming messages (leaving those lists empty will enable the default messages to be used)

Also adds a new protobuf definition file of mostly unknown values that enable toggling the message suffix on Instinct 2.
2024-05-03 20:28:11 +02:00
myxor
d72113c0cb Initial support for Garmin Vivoactive 5 2024-05-03 20:28:11 +02:00
Daniele Gobbetti
bdfab59a81 Garmin: Add support for replying to notifications
This uses the (assumed) new method of passing multiple actions, instead of the (assumed) legacy accept/decline approach.
At the moment the preset messages stored on the watch firmware are used for replying, the code supports using custom messages already but those have to be updated to the watch somehow (probably by protobuf) and this is not supported yet. Using custom messages if they are not set will just do nothing.
The NotificationActionIconPosition values have been determined on a vívomove Style and might not work properly on other watches.
The evaluation of GBDeviceEvent have been moved in GarminSupport since the notification actions handling uses device events.

Also adds a method to read null terminated strings to GarminByteBufferReader.
Also adds a warning in NotificationListener if the wrong handle is used for replying to a notification.
2024-05-03 20:28:11 +02:00
Daniele Gobbetti
ce968e1ea8 Garmin: Add FileDownloadedDeviceEvent and (disabled) file deletion
Also adds (disabled) file deletion in case of already downloaded files
2024-05-03 20:28:11 +02:00
Daniele Gobbetti
e6f78bbba4 Garmin: Add DST/Timezone support 2024-05-03 20:28:11 +02:00
hrdl
2673edf05b Add Garmin Forerunner 245 2024-05-03 20:28:11 +02:00
Daniele Gobbetti
9d2a42b173 Garmin: Support file archival (deletion) on watch
Also add original timestamp to local cache filename as the file identifier are reused
Also fix imports of Test class
2024-05-03 20:28:11 +02:00
José Rebelo
a21ceb606c Garmin: Fetch activity on demand 2024-05-03 20:28:11 +02:00
José Rebelo
b0932d0f17 Garmin: Fix proguard rules for release builds 2024-05-03 20:28:11 +02:00
José Rebelo
3dab968805 Garmin: Allow high MTU 2024-05-03 20:28:11 +02:00
José Rebelo
9c7aa8c22b Garmin protocol: Simplify FILE_TYPE 2024-05-03 20:28:11 +02:00
José Rebelo
207ab89448 Garmin protocol: Fix linter warnings 2024-05-03 20:28:11 +02:00
José Rebelo
4c3092089e Garmin protocol: Introduce GarminCoordinator 2024-05-03 20:28:11 +02:00
José Rebelo
993765b3c6 Garmin protocol: fix crash when stopping find phone 2024-05-03 20:28:11 +02:00
Daniele Gobbetti
554e33adaa Garmin protocol: basic file transfer and notification handling
adds synchronization of supported files from watch to external directory
adds support for Activity and Monitoring files (workouts and activity samples), but those are not integrated yet
adds upload functionality (not used ATM and not tested)
adds notification support without actions
introduces centralized processing of "messageHandlers" (protobuf, file transfer, notifications)

also properly dispose of the music timer when disconnecting
2024-05-03 20:28:11 +02:00
Daniele Gobbetti
951f550b87 Garmin protocol: enable media volume control from watch 2024-05-03 20:28:11 +02:00
Daniele Gobbetti
ed0f8077e7 Garmin protocol: store max packet size from DeviceInformationMessage
also adds messageType to the warnifleftover log message
2024-05-03 20:28:11 +02:00
Daniele Gobbetti
f90b544dc9 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-03 20:28:11 +02:00
Daniele Gobbetti
a5bf32b9f1 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-03 20:28:11 +02:00
Daniele Gobbetti
e18d7df513 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-03 20:28:11 +02:00
Daniele Gobbetti
e1bfd05523 Garmin protocol: create custom GBDeviceEvent for weather request 2024-05-03 20:28:11 +02:00
Daniele Gobbetti
3ea737d89c Garmin protocol: use message enum instead of id in GFDI Messages 2024-05-03 20:28:11 +02:00
Daniele Gobbetti
6b7db3d92d 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-03 20:28:11 +02:00
Daniele Gobbetti
74facd4505 Garmin protocol: create specific field definition for day of week 2024-05-03 20:28:11 +02:00
Daniele Gobbetti
9152a5c3da 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-03 20:28:11 +02:00
Daniele Gobbetti
07d4dd9dcb Garmin protocol: fix invalid signed int base type value 2024-05-03 20:28:11 +02:00
Daniele Gobbetti
ae347bed98 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-03 20:28:11 +02:00
Daniele Gobbetti
4a38b7aee8 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-03 20:28:11 +02:00
Daniele Gobbetti
135073585e 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-03 20:28:11 +02: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
Balage
153199b3b4
Translated using Weblate (Hungarian)
Currently translated at 83.1% (2258 of 2714 strings)

Co-authored-by: Balage <222855@buas.nl>
Translate-URL: https://hosted.weblate.org/projects/freeyourgadget/gadgetbridge/hu/
Translation: Freeyourgadget/Gadgetbridge
2024-05-01 18:33:52 +02:00
Sergey Ponomarev
c7a29e4499
Translated using Weblate (Russian)
Currently translated at 95.1% (2580 of 2711 strings)

Co-authored-by: Sergey Ponomarev <stokito@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/freeyourgadget/gadgetbridge/ru/
Translation: Freeyourgadget/Gadgetbridge
2024-05-01 18:33:51 +02:00
Nyatsuki
7b05853b7d
Translated using Weblate (Japanese)
Currently translated at 54.6% (1494 of 2735 strings)

Translated using Weblate (Japanese)

Currently translated at 45.8% (1255 of 2735 strings)

Translated using Weblate (Japanese)

Currently translated at 44.3% (1213 of 2735 strings)

Translated using Weblate (Japanese)

Currently translated at 42.3% (1157 of 2734 strings)

Translated using Weblate (Japanese)

Currently translated at 41.5% (1136 of 2734 strings)

Translated using Weblate (Japanese)

Currently translated at 41.5% (1135 of 2734 strings)

Translated using Weblate (Japanese)

Currently translated at 41.5% (1134 of 2731 strings)

Translated using Weblate (Japanese)

Currently translated at 41.4% (1131 of 2731 strings)

Translated using Weblate (Japanese)

Currently translated at 41.1% (1124 of 2731 strings)

Translated using Weblate (Japanese)

Currently translated at 39.3% (1069 of 2716 strings)

Translated using Weblate (Japanese)

Currently translated at 38.3% (1042 of 2714 strings)

Translated using Weblate (Japanese)

Currently translated at 36.8% (1000 of 2711 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:33:49 +02:00
summoner001
d543dcdd80
Translated using Weblate (Hungarian)
Currently translated at 81.0% (2198 of 2711 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:47 +02:00
0que
58c4242ba5
Translated using Weblate (Russian)
Currently translated at 95.0% (2578 of 2711 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:44 +02:00
Hikaru
1d53259988
Translated using Weblate (Japanese)
Currently translated at 30.4% (826 of 2711 strings)

Co-authored-by: Hikaru <Hikali-47041@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/freeyourgadget/gadgetbridge/ja/
Translation: Freeyourgadget/Gadgetbridge
2024-05-01 18:33:41 +02:00
Nyatsuki
f596c3b83c
Translated using Weblate (Japanese)
Currently translated at 30.4% (826 of 2711 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:33:40 +02:00
ritchierope
2ed0be0bcd
Translated using Weblate (Hungarian)
Currently translated at 80.2% (2175 of 2711 strings)

Co-authored-by: ritchierope <zdg.acc@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/freeyourgadget/gadgetbridge/hu/
Translation: Freeyourgadget/Gadgetbridge
2024-05-01 18:33:37 +02:00
summoner001
a94e1eb573
Translated using Weblate (Hungarian)
Currently translated at 80.2% (2175 of 2711 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:35 +02:00