1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-06-26 15:00:13 +02:00
Commit Graph

5431 Commits

Author SHA1 Message Date
José Rebelo
424e58071e Garmin: Fix reply to sms 2024-05-01 23:35:16 +01:00
José Rebelo
01f6f0ccae Garmin: Add setting to disable notifications 2024-05-01 23:35:16 +01:00
José Rebelo
c50389e06b Garmin Venu 3: Enable canned replies 2024-05-01 23:35:16 +01:00
Daniele Gobbetti
ca638b4e58 Garmin: use developer device setting for keeping data on device
Make use of the previously added preference to toggle file archival (deletion) on the watch.

Default is true (keep data on device) until we are sure of the consequences.
2024-05-01 23:35:16 +01:00
José Rebelo
a795d87334 Garmin: Map all known files types 2024-05-01 23:35:16 +01:00
José Rebelo
9867443772 Garmin: Add support for http weather requests 2024-05-01 23:35:16 +01:00
Daniele Gobbetti
c44258310e Garmin: Rename LocalMessage to PredefinedLocalMessage and clarify its usage
PredefinedLocalMessage are only useful for FIT messages and should not interfere with FIT files. The only impact of using the local message in fit files was in the textual output, but it was confusing.

Add an explicit constructor to RecordHeader if PredefinedLocalMessage should be taken into account, and use this only in fit messages leaving the default constructor for fit files.

Also adjusts the test case as textual output comparison needs to be fixed.
2024-05-01 23:35:16 +01:00
kuhy
53e8b811f9 Initial support for Garmin Vivoactive 4S 2024-05-01 23:35:16 +01:00
Daniele Gobbetti
931a193296 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-01 23:35:16 +01:00
myxor
60fa03ca16 Initial support for Garmin Vivoactive 5 2024-05-01 23:35:16 +01:00
Daniele Gobbetti
909a5159e1 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-01 23:35:16 +01:00
Daniele Gobbetti
483e904ad3 Garmin: Add FileDownloadedDeviceEvent and (disabled) file deletion
Also adds (disabled) file deletion in case of already downloaded files
2024-05-01 23:35:16 +01:00
Daniele Gobbetti
7649edded9 Garmin: Add DST/Timezone support 2024-05-01 23:35:16 +01:00
hrdl
7ce134a51e Add Garmin Forerunner 245 2024-05-01 23:35:16 +01:00
Daniele Gobbetti
c4a44c8c10 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-01 23:35:16 +01:00
José Rebelo
09f4f86a61 Garmin: Fetch activity on demand 2024-05-01 23:35:16 +01:00
José Rebelo
3b752d4140 Garmin: Allow high MTU 2024-05-01 23:35:16 +01:00
José Rebelo
aae78767a7 Garmin protocol: Simplify FILE_TYPE 2024-05-01 23:35:16 +01:00
José Rebelo
5e922b735e Garmin protocol: Fix linter warnings 2024-05-01 23:35:16 +01:00
José Rebelo
9ed8c86eae Garmin protocol: Introduce GarminCoordinator 2024-05-01 23:35:16 +01:00
José Rebelo
7249830013 Garmin protocol: fix crash when stopping find phone 2024-05-01 23:35:16 +01:00
Daniele Gobbetti
fa8f09e95a 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-01 23:35:16 +01:00
Daniele Gobbetti
0f1f4f7c6b Garmin protocol: enable media volume control from watch 2024-05-01 23:35:16 +01:00
Daniele Gobbetti
7603d7dd5f Garmin protocol: store max packet size from DeviceInformationMessage
also adds messageType to the warnifleftover log message
2024-05-01 23:35:16 +01:00
Daniele Gobbetti
136c81f0bc 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-01 23:35:16 +01:00
Daniele Gobbetti
918791560b 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-01 23:35:16 +01:00
Daniele Gobbetti
76f51e9412 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-01 23:35:16 +01:00
Daniele Gobbetti
3419a7ad8e Garmin protocol: create custom GBDeviceEvent for weather request 2024-05-01 23:35:16 +01:00
Daniele Gobbetti
07db0ea7a5 Garmin protocol: use message enum instead of id in GFDI Messages 2024-05-01 23:35:16 +01:00
Daniele Gobbetti
520a510dd9 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-01 23:35:16 +01:00
Daniele Gobbetti
1db2cc0354 Garmin protocol: create specific field definition for day of week 2024-05-01 23:35:16 +01:00
Daniele Gobbetti
9f5ed6d7dd 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-01 23:35:16 +01:00
Daniele Gobbetti
36ede1976b Garmin protocol: fix invalid signed int base type value 2024-05-01 23:35:16 +01:00
Daniele Gobbetti
7ee82e6afa 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-01 23:35:15 +01:00
Daniele Gobbetti
ed908b59fd 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-01 23:35:15 +01:00
Daniele Gobbetti
4363f94661 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-01 23:35:15 +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
Martin.JM
83fd09939f [Huawei] Fix PR #3742, add workout frequency and altitude 2024-05-01 16:32:27 +00:00
Damien 'Psolyca' Gaignon
2d32822ff8
[Huawei] Add Huawei Watch Fit 2 gadget 2024-05-01 12:03:59 +02:00
José Rebelo
18e08d13da Fix tests and linter 2024-04-30 20:43:23 +01:00
Martin.JM
1c2c1f710e [Huawei] Add support for workout calories and cycling power 2024-04-30 21:08:23 +02:00
José Rebelo
013ffe5559 Format pace as mm:ss 2024-04-29 19:50:57 +01:00
Martin.JM
bcd35b02da [Huawei] Add HR and SpO support for two watches
- Huawei Watch GT4
- Huawei Watch Ultimate
2024-04-29 10:58:24 +02:00
Gonk
b7d2808392 Added debug end call to the API 2024-04-28 23:19:24 +02:00
José Rebelo
9bef90a151 HPlus: Migrate global preferences to device-specific 2024-04-28 19:02:20 +01:00
Vitaliy Tomin
4d0d9e298e huawei: feature: File upload and watchface management (#3671)
Co-authored-by: Vitaliy Tomin <highwaystar.ru@gmail.com>
Co-committed-by: Vitaliy Tomin <highwaystar.ru@gmail.com>
2024-04-27 21:37:15 +00:00
aGoodUsername
aad03ddf0e bangle.js: normalized activity intensity 2024-04-27 05:22:48 +00:00
Damien 'Psolyca' Gaignon
c1e0b1fcd5 [Huawei] Enable sleep detection 2024-04-26 19:50:37 +00:00