1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-15 06:29:24 +01:00
Commit Graph

10902 Commits

Author SHA1 Message Date
Daniele Gobbetti
54070b2652 Garmin: Add FileDownloadedDeviceEvent and (disabled) file deletion
Also adds (disabled) file deletion in case of already downloaded files
2024-05-24 22:24:08 +02:00
Daniele Gobbetti
2c70f1a616 Garmin: Add DST/Timezone support 2024-05-24 22:24:08 +02:00
hrdl
69934b2d7c Add Garmin Forerunner 245 2024-05-24 22:24:07 +02:00
Daniele Gobbetti
42e44de1ac 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-24 22:24:07 +02:00
José Rebelo
5c57392b85 Garmin: Fetch activity on demand 2024-05-24 22:24:07 +02:00
José Rebelo
0d230ce0a5 Garmin: Fix proguard rules for release builds 2024-05-24 22:24:07 +02:00
José Rebelo
2eb342860a Garmin: Allow high MTU 2024-05-24 22:24:07 +02:00
José Rebelo
aaa3e086d0 Garmin protocol: Simplify FILE_TYPE 2024-05-24 22:24:07 +02:00
José Rebelo
fb06a48756 Garmin protocol: Fix linter warnings 2024-05-24 22:24:07 +02:00
José Rebelo
72de9bafe9 Garmin protocol: Introduce GarminCoordinator 2024-05-24 22:24:07 +02:00
José Rebelo
4c734e4717 Garmin protocol: fix crash when stopping find phone 2024-05-24 22:24:07 +02:00
Daniele Gobbetti
e6365638d4 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-24 22:24:07 +02:00
Daniele Gobbetti
9dee71df6f Garmin protocol: enable media volume control from watch 2024-05-24 22:24:07 +02:00
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