Commit Graph

246 Commits (8815f0d134e19648b664be12d709fa804511b256)

Author SHA1 Message Date
cpfeiffer 8815f0d134 Small cleanups and fixlets. 2016-03-28 23:02:22 +02:00
Andreas Shimokawa 6ce63276a3 play around with play states, simplify weired nested switch 2016-03-27 19:50:32 +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 3714ec82da Extracted String "HR: ", (= Heart Rate Firmware Version) 2016-03-24 22:23:16 +01:00
cpfeiffer 89eddb13b0 Fixed connection issues by reading the date from the band #249 2016-03-24 22:10:23 +01:00
cpfeiffer e5b0afb916 Enable low latency during activity sync 2016-03-24 21:26:51 +01:00
cpfeiffer 11ac01f0e8 Set low latency mode during initialization #249
This appears to fix the initialization getting stuck sometimes, e.g.
after turning on bluetooth and then connecting.

The band incidentally sends 0x8 when it's stuck (won't accept the UUID_PAIR
request).
2016-03-23 22:50:42 +01:00
cpfeiffer b0ec74696d Give better feedback when a firmware cannot be installed #234 2016-03-22 16:12:27 +01:00
cpfeiffer 424d9cd142 More work on firmware detection, recognition and validation #234
Should be as robust as possible now.
2016-03-21 23:42:34 +01:00
cpfeiffer 275839a7f4 last arg of copyOfRange() is index, not length! 2016-03-21 04:18:45 +01:00
cpfeiffer f7b71c1f96 Add logging to firmware detection #234 2016-03-21 04:17:12 +01:00
Andreas Shimokawa 4be1926459 reformat code though Android Studio 2016-03-20 15:00:05 +01:00
cpfeiffer b3410dcebe Improved testcase #234 2016-03-20 12:18:43 +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 6d8d6d5bc8 Testcases for firmware checking 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
Andreas Shimokawa a89fea9c7d Pebble: Fix crash when starting pebstyle
Also make code for "push" handlers more generic
2016-03-08 12:02:00 +01:00
Andreas Shimokawa 88982a6174 Merge pull request #235 from Freeyourgadget/feature-configuration
Use external browser for configuring pebble apps
2016-03-08 10:41:46 +01:00
cpfeiffer 5eb8f57b4c Some more byte -> int conversions 2016-03-07 22:47:34 +01:00
cpfeiffer be012eca8d For Mi Band 1A (fw 5.15.7.14) we get 0xa for auth success #180 2016-03-07 21:43:45 +01:00
cpfeiffer 50dd7f5eba Better check for heartrate support on non-heartrate devices 2016-03-07 21:36:31 +01:00
Daniele Gobbetti 3920b3f977 Do not override the configured settings with our old stored values (but keep them around) 2016-03-04 17:43:43 +01:00
Andreas Shimokawa bd7b34985b reformat code and optimize imports 2016-03-03 15:47:00 +01:00
Andreas Shimokawa 2a7f9226a0 Pebble: send configuration to watch
TODO: handle booleans
2016-03-03 14:23:17 +01:00
Andreas Shimokawa 63d938559e pass GBDevice down to ExternalPebbleJSActivity to determine the platform version (aplite,basalt,chalk) 2016-03-03 11:52:30 +01:00
Andreas Shimokawa fc464d112d change some more short and byte to int regarding Morpheuz 2016-02-29 23:13:07 +01:00
cpfeiffer cbe73f71a1 Fix some typos (thanks!) #178 2016-02-29 22:08: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 d7822d07a6 Show the measured heart rate as a Toast, for now #178 2016-02-27 23:27:15 +01:00
cpfeiffer 3ff31cd73b Disable heartrate in charts fow now, fix notification for manual hr 2016-02-27 23:18:44 +01:00
cpfeiffer ac8d7bee5f Only do heart rate stuff when supported #178 2016-02-27 11:23:55 +01:00
cpfeiffer de6f898fef Some more fixes regarding heart rate measurement #178 2016-02-27 11:18:16 +01:00
Kasha 9e636d66f6 Initial heart rate support by KashaMalaga #178
(removed unrelated Android M fixes and squashed commits)
2016-02-27 00:05:06 +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
Daniele Gobbetti df741e9571 Install app on watch directly instead of telling the user to do so. 2016-02-26 15:29:26 +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 c86365ee2e Some more Mi Band pairing improvements #180
- listen to notifications early -- the band then actually tells us that
  authentication is required
- check for this after sending user info
- add authentication states to GBDevice
- workaround for event problems in pairing activity (delivered although
  already unregistered)
- BtLEQueue now deals with gatt events coming *before* connectGatt()
  actually returned (namely the connection event)
2016-02-13 00:15:16 +01:00
Daniele Gobbetti 8294921de7 Do not ack the sleep data until we can actually store them
Added helper method to fetch the latest timestamp stored in the DB, needed for the aforementioned feature.
Update changelog

This closes #188 \o/
2016-02-11 19:14:40 +01:00
Andreas Shimokawa 7436778700 Pebble: fix for recent morpheuz versions (maybe breaks old versions) 2016-02-11 12:49:01 +01:00
Daniele Gobbetti 20c4e49fe1 Refactoring of the Pebble Health steps data receiver.
Added logic to deal with pebble health sleep data.
Added database helper to change the type of a range of samples (needed for sleep data).
Fixes to the Pebble Health sample provider.
2016-02-09 17:52:21 +01:00
Andreas Shimokawa d62946df63 Pebble: some minor code cleanups regarding health 2016-02-09 01:31:41 +01:00
Andreas Shimokawa 93db073538 Pebble: try to fix health code, might be broken, cant test 2016-02-09 00:56:16 +01:00
Andreas Shimokawa 12a5b53f00 Pebble: Merge DatalogHandler and DataLog session
Also:
- pass the length of the payload and not of the whole datalog buffer to handleMessage(), simplifying DatalogSessionHealth::handleMessage()
2016-02-09 00:49:42 +01:00
Andreas Shimokawa b01a517813 Pebble: fix hexdump for health datalog 2016-02-08 23:33:05 +01:00
Andreas Shimokawa 0c4e606e74 Pebble: rename BLOBDB_HEALTH to BLOBDB_PREFERENCES and encodeSaneDistanceUnit to encodeSetSaneDistanceUnit
Also allow to set insane units in the method
2016-02-07 21:59:14 +01:00