Commit Graph

77 Commits (4b4e95bfe0a0b18bd98bc5d31f1c0f23f68757be)

Author SHA1 Message Date
cpfeiffer c468e7f521 Mi Bands+Bip: when an operation finishes, unset the gatt callback on the BtLEQeue
Otherwise it will continue to receive events until another transaction is being executed.
2017-09-02 22:49:58 +02:00
License Bot e392fbfd80 Add license header to all java files. 2017-03-10 14:53:19 +01:00
cpfeiffer 999d3e3252 Mi1: Attempt at throttling notifications during sync #438 2016-12-25 23:27:56 +01:00
cpfeiffer 6dfc895303 Mi2: Initial work on firmware update #427 2016-12-11 02:11:58 +01:00
Andreas Shimokawa 17b581022b optimize imports 2016-12-09 20:14:17 +01:00
cpfeiffer 49acde118d Do not log heartrate separately during miband 1s sync 2016-11-29 23:25:11 +01:00
cpfeiffer 82cd06f4c1 Mi2: WIP: initial support for activity data
(#323)
2016-11-22 00:05:41 +01:00
cpfeiffer 125c0092cb Storage and improved way of realtime data (hr, steps so far) 2016-10-08 01:35:58 +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
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 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
cpfeiffer 876bdac918 More WIP: remove now unused code, better use of generics 2016-05-16 23:36:54 +02:00
cpfeiffer 40a376bbd0 Merge branch 'master' into db-refactoring 2016-05-16 23:01:16 +02:00
cpfeiffer 3e0bc16741 More WIP, but we're getting closer
current state:
- storing samples works (tested only mi band)
- charts work
2016-05-16 23:00:04 +02:00
cpfeiffer 3a1f91b5a8 Default to low latency mode #287
Tested with Mi1A and Mi1S -- works fine and faster than without
low-latency mode.
2016-05-15 00:22:53 +02:00
cpfeiffer 8ca821ab8a More WIP on db refactoring 2016-05-13 23:47:47 +02:00
cpfeiffer d0c8483d92 More WIP 2016-05-08 23:49:15 +02:00
Andreas Shimokawa 65a95366f4 Mi Band: Allow setting low-latency FW update mode in Mi Band development settings 2016-05-04 13:24:32 +02:00
cpfeiffer e35ce978bd Remove now unused imports + fix one more SharedPreferences usage 2016-04-25 23:43:19 +02:00
cpfeiffer 0704915a88 Move parsing of preference strings to int values to Prefs 2016-04-25 23:39:03 +02:00
cpfeiffer 59c3970008 Reuse characteristic objects #234 2016-04-03 23:01:58 +02:00
cpfeiffer a4919789ca Add some progress to firmware updating #271 #234
Also: remove the low latency mode for firmware update,
because my Mi1S simply disconnects then.

Still missing in the view: device disconnects
2016-04-03 00:50:45 +02:00
cpfeiffer 0e49535966 Fix progress during fw update #234 2016-04-02 22:24:33 +02:00
cpfeiffer ea5c6a0848 Log ignored notifications when updateCoordinator is null 2016-03-31 21:57:36 +02:00
cpfeiffer 4631df67ac Some more logging + add svg launcher again (somehow it was not added again) 2016-03-30 22:53:08 +02:00
cpfeiffer ffc006c21c Fix ordering problem with firmwareInfoSent state variable #234 2016-03-30 21:56:00 +02:00
cpfeiffer cc7f5406ef Use low latency transfer mode for fw update #234 2016-03-30 21:48:42 +02:00
cpfeiffer e931cf47d7 Need to pass '0' as parameter to mi band fw metadata info #234 2016-03-29 22:15:14 +02:00
cpfeiffer 8815f0d134 Small cleanups and fixlets. 2016-03-28 23:02:22 +02:00
Andreas Shimokawa adfef3db42 Prepare code for more music metadata (duration, track count, current track number)
Oh and format code
2016-03-27 17:45:44 +02:00
cpfeiffer 8165751e57 Refactoring to test the double firmware update procedure #234
(while performing the same, known to be working firmware update for Mi1A)

Result: double firmware update procedure works on Mi1A.

Also updated FirmwareTest. Perform all tests not only in the test itself,
but also at runtime before doing the actual update.

Further:
- fix setting of firmwareInfoSent state variable, which prevented installation
  of the section firmware
- make one string translatable
2016-03-25 23:45:27 +01:00
cpfeiffer e5b0afb916 Enable low latency during activity sync 2016-03-24 21:26:51 +01:00
cpfeiffer 4f956000c5 Enhanced support for firmware detection, recognition and upgrade #234
Also supports double firmware upgrade for Mi1S.
- so far, only hr firmware upgrade is tested for 1S
- adds junit testcases for firmware recognition and handling
2016-03-20 01:07:57 +01:00
cpfeiffer c5a887192d Remove/revert some temporary test code 2016-03-16 00:27:32 +01:00
cpfeiffer e26e6d7b24 Display HR firmware version
Hide fw,hw,hr versions by default and show them on demand with an info
button.
2016-03-16 00:27:32 +01:00
cpfeiffer 91f02ae920 WIP: Lots of work towards double firmware update for Mi 1S #234 2016-03-16 00:27:08 +01:00
cpfeiffer 5eb8f57b4c Some more byte -> int conversions 2016-03-07 22:47:34 +01:00
Andreas Shimokawa ed85fd5011 convert byte and short values related to activity tracking to int
This avoids a lot of problems because java
- does not know unsigned values
- jvm and dalvic do not internally support byte and short
- sqlite does not know them either
2016-02-29 20:54:39 +01:00
cpfeiffer ddde25e5df Initial firmware update support for Mi1S #234 2016-02-28 02:46:48 +01:00
cpfeiffer de6f898fef Some more fixes regarding heart rate measurement #178 2016-02-27 11:18:16 +01:00
cpfeiffer 0ef738067d Some work in progress for heart rate graphs #178
Currently we get the heart rate when synchronizing activity data
(i.e. not live) and we write it to the activity database so that we
can show a nice graph. The value is currently always 0 though,
because we can't enable recording hr, yet.
2016-02-26 23:45:17 +01:00
cpfeiffer 0b568df8de Extra byte indeed appears to be heartrate value #205 2016-02-26 00:04:33 +01:00
cpfeiffer 095ef56c14 Initial support for activity data sync with Mi 1S #205
Looks like the activity type is somehow wrong though, or I'm sleeping
all day ;-)
2016-02-25 23:52:34 +01:00
cpfeiffer ae5417b9cc Avoid NPEs when aborting an erroneous sync #205 2016-01-07 00:33:20 +01:00
cpfeiffer 365ce61cb6 Support for firmware upgrade/downgrade on Mi 1A.
I hope I didn't break firmware upgrades on some Mi 1 models
other than mine (my hardware revision is 2).

Upgrades for Mi 1S are currently disabled, we need some brave
souls who can help us test this.

Closes #173
Also see: #169
2015-12-07 01:14:06 +01:00
cpfeiffer 6b053c4240 Make method protected, for future use 2015-12-07 01:13:47 +01:00