1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-10 15:34:50 +02:00
Commit Graph

438 Commits

Author SHA1 Message Date
Daniele Gobbetti
5cbedc782d Pebble health: accept records of firmware 4.0 (nothing changed among the data we parse) 2016-09-04 15:59:19 +02:00
Daniele Gobbetti
84e644fa1a Add preference for save raw pebble health data. 2016-08-31 14:05:02 +02:00
Andreas Shimokawa
c55369747d launch onboarding (database migration) activity from service when:
- device got initialized
- is not yet in the new device db
- an old database exists
2016-08-28 23:49:05 +02:00
cpfeiffer
c59553c9c9 Rename GBDevice#hardwareVersion to model
(e.g. while DeviceType is "PEBBLE" in general, the model
might specify a Pebble Time or Time Steel.
2016-08-26 20:57:59 +02:00
Daniele Gobbetti
2a2ad20aa3 Store raw data in the DB for later interpretation. 2016-08-21 20:24:02 +02:00
Andreas Shimokawa
3fb558c536 db refactoring: add raw data column in health overlay table and make rawType part of the composite key 2016-08-18 22:06:26 +02:00
Daniele Gobbetti
0126b90f20 Store the timestamps as sent by the pebble. Use a strict inequality operator at the end of the period to exclude the last sample. 2016-08-18 21:44:06 +02:00
Andreas Shimokawa
ce8af615d1 Merge branch 'composite-key-dao' 2016-08-18 20:35:56 +02:00
cpfeiffer
fbf06c1fe3 Separate coordinator and support instances for Mi1 and Mi2 #323
+ Some more testing stuff for Mi2
2016-08-17 00:53:16 +02:00
cpfeiffer
9b7e8e06d6 Improved time conversion (0x2A0F)
- support for org.bluetooth.characteristic.local_time_information
- support for day of week in 0x2A2B

Unfortunately Mi Band 2 does not support 0x2A0F ;(
2016-08-15 00:40:35 +02:00
cpfeiffer
8766fc5269 Handle MiBand2 device type 2016-08-14 23:25:35 +02:00
Andreas Shimokawa
69933c5e92 db refactoring: depend on latest -fyg patched greendao, change column order again (primary keys first), remove index from pebble health overlay also 2016-08-14 22:33:41 +02:00
Andreas Shimokawa
eb962c65f0 work towards composite keys
(builds but does not run because greendao generates wrong table creation code - we need to fix that)
2016-08-13 01:24:43 +02:00
Andreas Shimokawa
68b303246d db refactoring: change column order for health overlay table also 2016-08-10 23:26:25 +02:00
Andreas Shimokawa
359ed46b06 db refactoring: remove raw activity kind field from pebble health minute data, add a blob column for raw undecoded health minute data.
also:
- change column order for all pebble related minute data tables (mandatory stuff first, then custom columns, for easier addition of new columns)
- remove unused code

TODO:
- fix column order in Mi Band table also
2016-08-10 23:06:07 +02:00
Daniele Gobbetti
4a7a34f461 Use only the overlay table for storing overlay data.
This removes the need to wait to have minute samples to store the overlay data, hence store has been made void instead of boolean.
2016-08-09 18:05:24 +02:00
Andreas Shimokawa
5072d6b959 Pebble: try to write to health activity overlay table 2016-08-08 19:16:53 +02:00
Andreas Shimokawa
6b2565e4c9 DB refactoring: remove activity type from Morpheuz database, determinate it in PebbleMorpheuzSampleProvider instead 2016-08-07 01:47:15 +02:00
Andreas Shimokawa
e05d40dc7e Pebble: Support for latest version of Morpheuz (4.6)
Also a few simplifications and minor fixes.
Morpheuz 3.7 should still work (last version for FW 2.x)
2016-08-06 01:19:38 +02:00
cpfeiffer
43d7566c0b some more microsteps #206 2016-08-01 22:18:57 +02:00
Andreas Shimokawa
4fe498efc2 Pebble: delay 100ms after writing a pebble packet to the output steam
This fixes a problem on newer firmwares, probably from 3.0 on, where sending an
appmessage packet right after acknowledging a previous incoming appmessage
packet results in our outgoing appmessage packet to be NACKed by the pebble
firmware and not even reaching the app running on the pebble.
2016-07-31 23:49:19 +02:00
Andreas Shimokawa
8ba1ae3f3e create extra table for Morpheuz, remove more unused stuff
Pebble activity tracker now do not share a common base anymore.

TODO: consider creating a custom way of querying activity types like in Misfit. The activity kind stored in the database now is solely based on the intensity, so it is redundant.

(#206)
2016-07-31 00:06:26 +02:00
Andreas Shimokawa
eabe625c47 rename some classes, remove obsolete ones 2016-07-30 23:22:27 +02:00
cpfeiffer
b43b7948b0 Let GallCallback return boolean values in order to mark an event as "consumed"
(to avoid dispatching the event to further listeners (ble profiles)
2016-07-28 23:04:37 +02:00
cpfeiffer
c9a9566dad Minor fixlet 2016-07-28 22:42:16 +02:00
cpfeiffer
b22111df9d Fix field ordering of ActivitySample (c'tor!) and improve importer #206 2016-07-28 22:12:20 +02:00
Andreas Shimokawa
8ea29e6e1d Refactor database / sample access (#206)
We now have separate tables for each provider's samples but a common interface.
2016-07-27 23:34:13 +02:00
Andreas Shimokawa
726f767576 work towards a Pebble Misfit raw sample table 2016-07-25 22:19:39 +02:00
cpfeiffer
f5ba09ebe0 Some babysteps towards miband2 support #323
Start to implement standard BLE profiles/services.
2016-07-25 00:00:22 +02:00
cpfeiffer
1997a9b7fa some more service discovery logging 2016-07-18 23:55:44 +02:00
cpfeiffer
7b26986ab0 Fix for #349
We must not use UUID_CHAR_PAIR anymore. This prevents connecting
without being bonded. Connecting when bonded still works.

As without bonding, ControlCenter would not display the device anymore,
we have to re-install the "remember last connected device" in the
preferences thing.
2016-07-15 00:13:49 +02:00
cpfeiffer
367091587f No more 0x8 in the logs
It's the confirmation that setting the latency succeeded.
2016-07-14 20:15:54 +02:00
cpfeiffer
8154a887cb When there are cached services, skip service discovery 2016-07-08 22:15:36 +02:00
cpfeiffer
8549031c6f Only attempt to reconnect when we were previously initialized 2016-07-04 23:38:25 +02:00
cpfeiffer
91d1cea51f Avoid potential NPEs 2016-07-04 22:40:24 +02:00
Andreas Shimokawa
73b2fc357e Pebble: Add some Pebble Time 2 support - NOT WORKING
Not working because these are expected to use BLE.
The Emulator should work though.
2016-07-04 22:09:56 +02:00
cpfeiffer
8b24e098ea Set sampleProvider to avoid NPEs 2016-07-01 00:22:54 +02:00
cpfeiffer
f65afa64d9 log raw activity data from mi band, closes #341
Hopefully aids in deciphering activity kinds.
2016-06-28 23:23:29 +02:00
cpfeiffer
f0da25c49b Fix activity fetching getting stuck when double tapping #333 2016-06-28 23:07:24 +02:00
cpfeiffer
e70a2290c3 sampleproviders now return device specific data #206 2016-06-27 20:43:48 +02:00
Andreas Shimokawa
659165fa4c Pebble: fix new app manager on 2.x
- properly intert apps reported from pebble into the corresponding tab
- disable tracking of installed apps
- disable drag and drop for apps and watchfaces
- ...
2016-06-24 13:39:29 +02:00
Andreas Shimokawa
1de6ee019f Pebble: fix regression. FW 2.x was completely broken
No one noticed, so it seems we can kill 2.x support soon :D
2016-06-24 12:07:44 +02:00
Andreas Shimokawa
b77f3ad3bf Pebble: Implement call dismissal with canned messages
This also moved the canned replies setting to pebble settings
(we will change that if we have another device supporting this)
2016-06-24 10:25:08 +02:00
Andreas Shimokawa
67e5bc0434 Pebble: implement decline call with SMS
Based on a proposal by @danielegobbetti, thanks!

This still does not enable the feature since the necessary blobdb is not filled yet
2016-06-21 00:31:53 +02:00
cpfeiffer
9772d8af06 Merge remote-tracking branch 'origin/master' into db-refactoring 2016-06-19 21:14:03 +02:00
Andreas Shimokawa
4b5969ef96 Merge branch 'master' into appmanager-fragments 2016-06-19 12:33:05 +02:00
Andreas Shimokawa
f42899d910 Pebble: on FW 2.x do not send extended music info and do not send playstate
I don't think they are supported and I cannot test.
2016-06-19 12:17:19 +02:00
Andreas Shimokawa
79b439da28 Implement App Sorting
- grab icon to move apps
- cache can be sorted but nothing will be send to watch
- if sorting apps or watchfaces, order will be sent to watch
- we try to keep track of what is installed and what not

Firmware 2.x is currently not working properly
2016-06-17 22:43:06 +02:00
cpfeiffer
d544509b60 Merge remote-tracking branch 'origin/master' into db-refactoring 2016-06-16 21:55:16 +02:00
Andreas Shimokawa
65ac4b364f Merge branch 'master' into appmanager-fragments 2016-06-16 01:09:35 +02:00