Commit Graph

1371 Commits (fa8df9f552265e207b500b91cf9658f53d9c5090)

Author SHA1 Message Date
Andreas Shimokawa fa8df9f552 add missing migration script 2016-11-27 10:52:43 +01:00
Andreas Shimokawa 16b4bfd0e7 Pebble LE: also return to control center if successfully initialized 2016-11-27 10:38:16 +01:00
Andreas Shimokawa 723ad53588 Call getDevice always when connected
This fixes a longstanding bug where device attributes where ONLY updated when fetching activity data or when pairing a new device
2016-11-27 10:32:56 +01:00
Andreas Shimokawa 24752d3455 Pebble: try harder to get LE address into the database, does not work 2016-11-27 10:10:50 +01:00
Andreas Shimokawa 34ad088b88 Pebble: Experimental support for BLE on all models via dev option in Pebble Settings
HOWTO:
1) Pair you normal Pebble (not necessary if already done), make sure it was connected once
2) Unpair your LE pebble if already paired
3) Switch on "Always prefer BLE" in Pebble Settings
4) Tap on the + in Control Center to add a new device
5) Pair your Pebble-LE XXXX or Pebble Time LE XXXX inside Gadgetbridge's Device Discovery actibity

Now Gadgetbridge will connect to your LE Pebble when tapping on Pebble XXXX if "Always Prefer BLE" option is enabled.
You can easily switch back to classic LE by turning that option off again
2016-11-27 09:49:28 +01:00
cpfeiffer 2f7eb9ef23 Some more improvements to discovery
- pass service uuids to GBDeviceCandaidate so that DeviceCoordinators
  can detect devices by their services.

Note: they should not rely on service uuids being available
2016-11-27 02:46:07 +01:00
cpfeiffer b9ff2cd468 A few improvements to discovery
- display the right icon for found device candidates
- scan for specific LE services
2016-11-27 01:09:20 +01:00
Andreas Shimokawa 352fc1a030 fix wrong return value 2016-11-25 14:53:12 +01:00
Andreas Shimokawa a5263141d7 Pebble 2: Ignore all GATT communication with all other that the current device
Fixes a bad bug where disconnecting from another BLE device caused the Pebble2 to disconnect
2016-11-25 14:28:04 +01:00
cpfeiffer 2d4645f6cc Fix only the first day label being displayed in Week Steps charts 2016-11-24 23:35:10 +01:00
Andreas Shimokawa 84caf22479 fix weekly charts to start y axis at 0 2016-11-24 22:27:44 +01:00
cpfeiffer 7da328d5db Fix an invalid leftover check for array length
Also removed a method invocation that did not belong there.
2016-11-24 22:16:04 +01:00
Andreas Shimokawa 9d083e2330 Pebble: add Kickstart Watchface to app manager on FW 4.X
I know it only exist on 4.3+, but I am lazy
2016-11-24 22:10:32 +01:00
cpfeiffer 3fdfb7d172 Mi2: Support for setting the fitness goal (steps) 2016-11-24 21:58:32 +01:00
cpfeiffer 9bebf1d32f When memory is really low, free up some memory #436
(although we probably can't save much)
2016-11-24 21:15:27 +01:00
cpfeiffer 60cb67c3c8 Some cleanup 2016-11-24 21:15:27 +01:00
cpfeiffer cc0fbff297 Set the sample provider in getLatestActivitySample() 2016-11-24 21:15:27 +01:00
Andreas Shimokawa 381323011e Pebble 2: work around FW installation problems
Wait a 0.5s after each complete Pebble packet and do not longer wait at all after a completed GATT package chunk (was 0.1s)
Big outgoing messages will be now much faster such as firmware installations but smaller take more time than before.

(This is not the proper fix but I could update the firmware this way, failed 10 times before after a few percent)
2016-11-24 18:52:58 +01:00
cpfeiffer 67d89ce1b9 Create the correct start-sync timestamp #323 2016-11-22 22:52:26 +01:00
cpfeiffer dfbaba4cb6 Make sure that the charts display the requested time range
(instead of only the range with available samples)
2016-11-22 15:53:58 +01:00
cpfeiffer a8a7d8db31 Mi2: WIP synchronize only new data since last sync
(#323)
2016-11-22 00:05:41 +01:00
cpfeiffer 0c51f86afc Mi2: more work on activity data #323 2016-11-22 00:05:41 +01:00
cpfeiffer 82cd06f4c1 Mi2: WIP: initial support for activity data
(#323)
2016-11-22 00:05:41 +01:00
Andreas Shimokawa eb052cead3 Pebble 2: Also honor the mtu when client gets a change reported
Should help older LE Pebbles
2016-11-21 17:29:16 +01:00
Andreas Shimokawa 647b67cfca Pebble 2: call both requestMTU and use the characteristic write 2016-11-21 15:17:03 +01:00
Andreas Shimokawa fce86482b9 Pebble 2: try an alternative way of setting the MTU (might revert) 2016-11-21 14:54:01 +01:00
Andreas Shimokawa e8da301da3 Pebble 2: fix a few crashes with disconnect/ reconnect 2016-11-20 22:04:49 +01:00
Andreas Shimokawa 4f3c46f704 Pebble 2: only add second service if first one was added sucessfully 2016-11-20 00:12:41 +01:00
Andreas Shimokawa 3b250a4568 Pebble 2: initial hacky reconnect support
Works sometimes, at least less crashes
(#432)
2016-11-19 23:53:07 +01:00
Andreas Shimokawa 029cc02a29 Pebble: Add Pebble specific pairing activity mainly useful for Pebble 2 since it properly pairs the Pebble after connecting with BLE
Fixes #433
2016-11-19 22:13:00 +01:00
Andreas Shimokawa ddfab1cdae Pebble 2: use requestMTU() on Android 5+ instead of characteristics write.
This actually fixes MTU problems with older Pebbles (Time, OG)
2016-11-18 23:47:48 +01:00
Andreas Shimokawa 4dc085de57 Pebble 2: React to MTU notifications, fixes LE for older pebbles also
It seems that setting the MTU on older pebbles does not work, so just use what we can use.
Maybe old pebbles need setMTU() which only works on Android 5+, we could use that conditionally...
2016-11-18 23:47:48 +01:00
cpfeiffer 51fa31aa66 Fix BLE type conversions problems 2016-11-18 23:36:22 +01:00
Andreas Shimokawa 66e3de9168 Pebble 2: improve connection problems (at least for me) 2016-11-18 22:38:39 +01:00
cpfeiffer 96a16245df Update to MPAndroidChart 3.0.1 2016-11-18 21:31:55 +01:00
Andreas Shimokawa d41848014b fix database schema migration from 13 to 14 2016-11-16 11:37:36 +01:00
Andreas Shimokawa 485cda52a8 Pebble 2: actually report HRM feature to Charts Activity 2016-11-15 23:41:35 +01:00
Andreas Shimokawa d7256d172e I hate java 2016-11-15 23:23:21 +01:00
Andreas Shimokawa 163a7bdf15 Pebble 2: save heart rate values to database (hopefully) 2016-11-15 23:21:13 +01:00
Andreas Shimokawa 82a47022fa Pebble 2: allow to disable/enable HRM in context menu of Workout app
Okay this might be stupid  since Workout seems to work also works without HRM!
I assumed (wrongly) that I will disable Workout by disabling HRM

anyway, better than not being able to toggle it at all!
2016-11-15 12:17:51 +01:00
Andreas Shimokawa 4b7f47ba6c Pebble 2: add Workout system app to app manager on P2 and hexdump incoming HRM datalog 2016-11-15 11:56:14 +01:00
Daniele Gobbetti 1a22752b98 Pebble: enable localStorage
LocalStorage native functions are overridden to keep each watchface's settings separated. It's possible the bind method do not work on older versions of android.
2016-11-14 17:51:33 +01:00
cpfeiffer d8145a52f9 Activate the display when lifting the wrist #323
Configurable, defaults to true
2016-11-13 21:47:54 +01:00
Andreas Shimokawa 00a71f53b3 Pebble 2: add not yet working code (at least not without weird workarounds)
This is is a pain because of tons of weird pairing issues
2016-11-13 21:29:58 +01:00
cpfeiffer d89899557c Mi2: Add config option to configure date/time display
(added a new EventHandler method to set a specific configuration option)
2016-11-13 20:47:24 +01:00
cpfeiffer ddaf51768d Improved logging 2016-11-13 20:24:25 +01:00
cpfeiffer 3cc8d887ca Mi2: Initial support for wear location, hr during sleep and date format #323
- wear location from prefs is sent to the band
- hr measurement during sleep is sent to the band
- date format is sent to the band (date+time or just time)
  (TODO: needs preference option)
2016-11-13 01:44:52 +01:00
Andreas Shimokawa f68bbe453b Pebble: bump flags and version we report
Plus some small preparations for P2 support which do not hurt in master
2016-11-10 11:05:32 +01:00
Andreas Shimokawa eb7646d26a Pebble: Fix vanished Health system apps (for affected users)
This code also allows us to add new system apps which will then appended to the current list of previous Gadgetbridge users.
2016-11-09 19:20:37 +01:00
Andreas Shimokawa 837dfd5917 Pebble: fix Pebble Health vanishing when deactivating 2016-11-09 12:06:13 +01:00