1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-08-06 05:51:56 +02:00
Commit Graph

57 Commits

Author SHA1 Message Date
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
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
cpfeiffer
aa60ce4b56 Disable some notifications also for update-firmware operation
(introduce a common superclass to do that)
2015-12-07 01:13:47 +01:00
cpfeiffer
8cd6bf09a4 Fix NPE when an error occurs during activity synchronization
(activityDataStruct is null after handleActivityFetchFinish())

Also remove superfluous log statement -- toasts are logged as well.
2015-12-07 01:13:47 +01:00
cpfeiffer
bd0716ba58 Some more lint warnings fixed 2015-11-23 23:04:46 +01:00
cpfeiffer
a53f1c21eb Simplification 2015-11-23 21:39:08 +01:00
cpfeiffer
952a383856 Use batched database commits for Mi Band activity samples 2015-11-01 21:41:36 +01:00
cpfeiffer
54c316778b Add exception to GB.toast() to get it logged 2015-10-25 00:13:32 +02:00
Daniele Gobbetti
cee03debbb - add code to send the confirmation of the activity data transfer after a timeout.
==> This is currently commented out because it was done to solve #141 but while doing this #143 popped out.
- send a stop_sync message to the band if the data doesn't fit the buffer. This way the data remains on the band.
2015-10-19 16:17:03 +02:00
cpfeiffer
ef15bf8ce8 Prevent firmware update for Mi Band 1A for now #136 2015-10-18 22:57:04 +02:00
cpfeiffer
dcd776e09a Attempt to fix never finishing activity data fetching #142
(by disabling unrelated notifications)
2015-10-18 22:27:52 +02:00
cpfeiffer
321c0ff125 Log when we get bogus timestamps #91 2015-10-03 23:42:22 +02:00
Andreas Shimokawa
1d41f2f8e4 Refactoring
The notfification APIs now use NotificationSpec as their only parameter, which
contains all information (required and optional ones).
We no longer have separate methods and actions for SMS/EMAIL/GENERIC anymore.
The type of notification is important now, not how we received them technically.
2015-09-24 14:45:21 +02:00
Daniele Gobbetti
e1ea8270ca Add a progress notification for the activity data transfer. 2015-09-24 14:03:01 +02:00
Daniele Gobbetti
5578691321 Fix progress bar 2015-09-24 14:02:33 +02:00
cpfeiffer
d9b4bbe550 Move activity data and progress manipulation into dedicated methods
I did this in trying to understand the code better and to easier allow
for error handling/transaction rollback to be added.
2015-09-23 23:16:42 +02:00
cpfeiffer
3852fcd756 Reuse MiBandDateConverter 2015-09-23 23:16:42 +02:00
Daniele Gobbetti
b73ff49681 Use data type constant instead of hardcoded value 2015-09-17 16:56:23 +02:00
cpfeiffer
e80a3cc591 Log the number of samples being flushed #91 2015-09-09 22:33:06 +02:00
Daniele Gobbetti
6c28b50f52 allow the transfer of activity data without clearing MiBand's memory 2015-09-07 12:06:56 +02:00
cpfeiffer
5c2bd1e8df Avoid code duplication by reusing logMessageContent() 2015-09-01 21:26:51 +02:00
cpfeiffer
50960277dd Localized some firmware update texts and added some toasts on finish 2015-08-30 21:56:45 +02:00