1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-09-11 08:46:43 +02:00
Commit Graph

17 Commits

Author SHA1 Message Date
Andreas Shimokawa
dbbcf20bbc reformat code 2015-07-25 21:52:52 +02:00
cpfeiffer
04e628b2d1 Separate fragments for all activity kinds and just sleep #45 2015-07-13 21:54:46 +02:00
cpfeiffer
580b86f41b Add creation timestamps to BtLEActions and transactions in debug output
(I think I still sometimes get "old" notifications)
2015-07-03 21:58:13 +02:00
cpfeiffer
ba76f64bf6 Disable context menu while busy and add "Disconnect" to context menu 2015-06-07 15:31:42 +02:00
cpfeiffer
5d950dc407 Fix reconnection after connection loss
Well, obviously we must not ignore connection state changes even if they
come with an error code.

Unfortunately the API docs are a bit terse in that respect.
2015-06-01 21:47:02 +02:00
cpfeiffer
7f89f4bb57 Some fixes regarding device initialization, should avoid disconnects
Avoid repeated initializations and device info requests. Fix unsetting
of dynamic state (e.g. battery info) when initialized.
2015-06-01 21:47:02 +02:00
cpfeiffer
11884d8073 Improve logging 2015-06-01 21:47:02 +02:00
cpfeiffer
75b9fe4c4d ignore connection state changes with status != GATT_SUCCESS
And add logging. Maybe this helps with #57
2015-06-01 21:47:02 +02:00
cpfeiffer
637b43e892 Also wait for descriptor reads and writes
(not just characteristic reads/writes)

This fixes initialization of notification characteristics
(activity, sensor data, battery, ...)
2015-06-01 21:47:01 +02:00
cpfeiffer
880dc7b3a4 Improve BLE gatt handling
- close() the gatt instance when explicitly disconnecting
- create a new gatt instance when explicitly connecting

Unfortunately I still appear to get spontaneous disconnects after some
notifications.
2015-05-22 23:18:29 +02:00
cpfeiffer
9819819b92 Create the wait-latch before running the action, and only if neeeded
Otherwise the result handler might be called before the wait-latch
has been created, leading to a deadlock of the thread.

Also: only wait for read- and write actions, but not for wait-actions.
2015-05-17 21:55:02 +02:00
cpfeiffer
9a26769c3e Search & replace: use slf4j for logging instead of Logcat directly
For a start, use android-logger as backend. Needs a better configuration
but no time right now.

For file-logging we will use logback as slf4j-implementation.
2015-05-12 06:33:37 +02:00
Andreas Shimokawa
613ff1fc91 Pebble: corrections to PebbleIoThreads, better logging 2015-04-26 00:54:41 +02:00
cpfeiffer
0377a751b0 be even more robust #35 2015-04-25 23:49:07 +02:00
cpfeiffer
06d8488792 #15 log as info, not error 2015-04-20 23:45:34 +02:00
Andreas Shimokawa
dd12bb11b2 reformat code with androidstudio 2015-04-19 11:28:03 +02:00
cpfeiffer
09914e6da0 #15 Initial support for MI Band
1) The MAC address has to be added manually for now (Settings -> Debug) 
2) Configure other notifications as desired
3) After doing that, restart Gadgetbridge, after that, the device should
be visible.
4) Tap it to connect
5) Try the Debug activity via the Menu to send some dummy notifications
=> Your MI should vibrate and blink

Also: add some extra files necessary to support Eclipse ADT. To be
migrated to Andmore, later.
2015-04-19 02:37:29 +02:00