1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-08-07 06:22:21 +02:00
Commit Graph

10774 Commits

Author SHA1 Message Date
Daniele Gobbetti
f13bc320ee Garmin protocol: store max packet size from DeviceInformationMessage
also adds messageType to the warnifleftover log message
2024-04-29 18:01:04 +02:00
Daniele Gobbetti
4fd9de2bab 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-04-29 18:01:04 +02:00
Daniele Gobbetti
0b858c2919 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-04-29 18:01:04 +02:00
Daniele Gobbetti
b89079b20f 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-04-29 18:01:04 +02:00
Daniele Gobbetti
48a65f30f5 Garmin protocol: create custom GBDeviceEvent for weather request 2024-04-29 18:01:04 +02:00
Daniele Gobbetti
5317d29d40 Garmin protocol: use message enum instead of id in GFDI Messages 2024-04-29 18:01:04 +02:00
Daniele Gobbetti
d8941204b8 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-04-29 18:01:04 +02:00
Daniele Gobbetti
06a70c4cff Garmin protocol: create specific field definition for day of week 2024-04-29 18:01:04 +02:00
Daniele Gobbetti
149e388265 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-04-29 18:01:04 +02:00
Daniele Gobbetti
a12a638f61 Garmin protocol: fix invalid signed int base type value 2024-04-29 18:01:04 +02:00
Daniele Gobbetti
a146d55798 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-04-29 18:01:04 +02:00
Daniele Gobbetti
0539324803 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-04-29 18:01:04 +02:00
Daniele Gobbetti
6b09ae7ff1 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-04-29 18:01:04 +02: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
José Rebelo
408f4b75dd Serbian transliterator: Map Đ and đ 2024-04-25 18:09:25 +01:00
José Rebelo
31408394b4 Serbian transliterator: Map Č and č 2024-04-25 18:08:55 +01:00
José Rebelo
61af26d7ce Add Serbian transliterator
As discussed in #3727
2024-04-25 17:51:45 +01:00
José Rebelo
500e930237 Refactor location service
- Refactor the code from a static global instance to a lifecycle-aware
  service instantiated in the DeviceCommunicationService
- Fix number of devices reported in the notification
- Prevents leaks and properly stops when devices get disconnected
2024-04-25 17:08:53 +01:00
José Rebelo
3799ffb72c Zepp OS: Sync calendar event reminders 2024-04-25 15:58:57 +01:00
José Rebelo
13d6c49bb5 Xiaomi: Sync calendar event reminders 2024-04-25 15:00:48 +01:00
Vitaliy Tomin
67cf9b2f00 huawei: Add huawei account support (#3721)
* this feature allows to pair HarmonyOS devices without factory reset to
  GB and Huawei Health.

* huawei account has form of 17 digit string and could be retrived from
  logcat filtering by huid=

Reviewed-on: https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/3721
Co-authored-by: Vitaliy Tomin <highwaystar.ru@gmail.com>
Co-committed-by: Vitaliy Tomin <highwaystar.ru@gmail.com>
2024-04-25 12:19:00 +00:00
Daniele Gobbetti
173e2d29b0 Include Organizer and Reminders when reading calendar events
Also use the named column indexes instead of numeric ids when retrieving the contents to make it more clear and more robust in case further fields are added later.

Reminders are set as absolute timestamp.
2024-04-25 11:46:34 +02:00
Marcel Alexandru Nitan
2190c82ed7 feature: Sleep as android support
Implement support for Sleep As Android with an usable example for ZeppOs
devices

Sleep as Android documentation:

https://docs.sleep.urbandroid.org/devs/wearable_api.html

Signed-off-by: Marcel Alexandru Nitan <nitan.marcel@protonmail.com>
2024-04-20 12:15:42 +03:00
Arjan Schrijver
f186053dab Dashboard: Add preference for drawing midnight at bottom of 24h chart 2024-04-18 20:06:56 +02:00
Arjan Schrijver
a2c861f66c Add preference for hiding bottom navigation bar 2024-04-17 21:58:23 +02:00
Damien 'Psolyca' Gaignon
4059566a25
[Huawei] Fix notification length 2024-04-16 23:10:01 +02:00
José Rebelo
c0d0b4dfbe Update hamcrest-library to 2.2 2024-04-15 23:45:55 +01:00
José Rebelo
bf01d9b346 Update protobuf dependencies 2024-04-15 22:04:45 +01:00
Damien 'Psolyca' Gaignon
84070dd0ba
[Huawei] Fix TimeZone offset calculation 2024-04-15 21:37:57 +02:00
Alik Aslanyan
f0a9ab7f98 Add Armenian transliteration 2024-04-15 19:58:27 +04:00
José Rebelo
9ae02f65ed Zepp OS: Change settings category to "calls and notifications" 2024-04-13 15:11:39 +01:00
Arjan Schrijver
523d02ae7f Generalize auto-pickup and read-notifications-aloud features 2024-04-13 14:10:54 +00:00
José Rebelo
717789dc48 Fix receiving shared gpx files 2024-04-13 13:55:25 +01:00
José Rebelo
320fccbaae Xiaomi: Fix crash when deleting last widget screen 2024-04-12 22:41:11 +01:00
MrYoranimo
5e6bf798a4 Xiaomi: implement setAutoReconnect on XiaomiSupport
The DeviceCommunicationService calls `#setAutoReconnect` on new device
supports before it calls the connect method. Since this method did not
get relayed to the connection-specific support classes, Xiaomi devices
using a BLE connection did not automatically reconnect because the
`mAutoReconnect` field in `AbstractBTLEDeviceSupport` never got set.
2024-04-12 20:54:49 +02:00
MrYoranimo
d39f86f3c8 Xiaomi: fix music volume command only increasing volume
Earlier Xiaomi devices would send either 0 or 100 for the requested
volume to indicate whether the app should increase or decrease the
phone's volume. Newer devices send the volume to change to, based on the
known current volume. We therefore need to check whether the device
increased or decreased the volume based on the current volume ourselves
in order to determine which event we want to fire.
2024-04-12 20:54:49 +02:00
MrYoranimo
35217aa405 Xiaomi: add support for 2x3 widget layouts
The Xiaomi Smart Band 8 Pro shows widgets in a two by three grid.
Previously, opening the widget configuration for such a device from the
device-specific preferences would crash Gadgetbridge because the layouts
in such a grid was not supported.

This commit adds definitions for layouts in a 2x3 grid to the
WidgetLayout enum, adds a definition for a full screen widget to the
WidgetType enum, defines rendering definitions for the new layouts to
WidgetScreenDetailsActivity, and defines translations for the new
layouts and type to XiaomiWidgetManager.
2024-04-12 20:54:49 +02:00
MrYoranimo
0b731611b9 Xiaomi: refactor WidgetManager for Redmi Watch 4
The Redmi Watch 4 reports both an unsupported widget type and layout
style:

- The firmware supports a screen layout for a single full screens
  widget, which is defined by layout ID 128;
- A full screen widget is a single 2x2 part, which is not supported.

This commit adds support for both the new layout and the new widget
type.

Furthermore, this commit refactors the XiaomiWidgetManager. Previously,
the supported layouts were determined by the types of parts supported by
the device. However, the supported layouts are reported by the device
through a bitfield in the widget capabilities message of which the purpose
was unknown, which is now used to determine the supported layouts.
2024-04-12 20:54:49 +02:00
MrYoranimo
796f26f74f Redmi Watch 4: initial experimental support 2024-04-12 20:54:49 +02:00
upalse
aaa66df082 Add menu items for NFC shortcuts on Mi Band 6 NFC. 2024-04-12 17:20:21 +01:00
Daniele Gobbetti
ff9207cd9a Nothing: add option to read aloud incoming notifications.
Also fixes a bug where the call would be accepted twice if the tts was not bound.
2024-04-12 16:51:49 +02:00
Daniele Gobbetti
1a8689d4bf Add "Delta Chat" to the recognized applications and as generic chat 2024-04-12 09:21:54 +02:00
Arjan Schrijver
cd8e9b5ea6 Dashboard: Fix crash on start when Devices is first screen 2024-04-10 22:11:45 +02:00
Arjan Schrijver
6f103b2897 Dashboard: Implement horizontal swiping and fix fragment related crashes 2024-04-10 21:53:03 +02:00
Ganblejs
96bbd578c8 Bangle.js: add wake on notification response OPEN 2024-04-10 19:36:17 +00:00