Andreas Shimokawa
2458e55865
Pebble: add encodeSimpleMessage() for encoding 1 byte messages to endpoints
2015-06-19 23:54:31 +02:00
Andreas Shimokawa
7e1700250f
Pebble: add dev option to force latest notification protocol usage
...
When enabled it forces to use 3.x notifications on FW 3.x (2.x notifcations on FW 2.x)
When disabled 2.x notification on FW 2.x and 1.x notifications on FW 2.x are used (which is recommended)
This allows Pebble Time users to do further tests.
2015-06-19 12:34:33 +02:00
cpfeiffer
e562fa9870
Light sleep and deep sleep was mixed up. Corrected graphs again. #45
...
Use dashed limit lines, still not perfect.
2015-06-19 01:14:58 +02:00
cpfeiffer
f9e5ab5fc1
Some more refinements to sleep display ( #45 ):
...
- display the recorded level of deep sleep rather than a constant
(I hope this works for morpheuz, too!?)
- give light sleep a minimum value, because it's sometimes 0 for Mi Band
2015-06-19 00:20:38 +02:00
cpfeiffer
03fa05756e
As a test, draw limit lines for sleep/activity changes.
...
Unfortunately it looks like the labels for it don't get rendered ;-(
2015-06-18 23:41:54 +02:00
cpfeiffer
83079b0456
Stub for device notification changes
2015-06-18 23:07:22 +02:00
Daniele Gobbetti
cb3be26349
Do something when we receive a CharacteristicChanged message
...
on the UUID_CHARACTERISTIC_BATTERY characteristic.
This is a first try at addressing #71
Please note that this will probably not work at this point, but it's
worth a try. To make it work probably we have to tell the device to
send updates, and we don't know how to do it.
2015-06-18 22:17:41 +02:00
Andreas Shimokawa
1801a679c5
Pebble: fix FW 3.x detection
2015-06-18 18:39:32 +02:00
Andreas Shimokawa
bffd7f332f
remove SleepChartActivityOld, as the new one is usable now ;)
2015-06-17 08:18:24 +02:00
cpfeiffer
a5ae7acc63
Improved sleep chart #45
...
- use just one data set, because multiple data sets is not supported
by MPAndroidChart (the way we need it)
Now there is hardly any space between the bars anymore
Also:
- allow scaling x and y axis independently via pinch gesture
- set fixed y max value (1.0) so that the display is stable and
independent of the actual available data
- (at least temporarily) display y labels
2015-06-17 07:03:50 +02:00
cpfeiffer
8709b95a95
Use a single data set instead of one per activity kind
...
The reason is that multiple data sets will always be grouped.
If we add null values to fix the grouping issue, we will still have
space between the bars.
2015-06-17 07:03:50 +02:00
Andreas Shimokawa
a07aed62ad
Pebble: Experiment with 3.x compatible notifications
...
This will most probably not work, but please test if you can ;)
2015-06-16 23:15:51 +02:00
Andreas Shimokawa
70c021e92c
SleepChartActivity: Make light sleep color brighter
2015-06-13 20:47:36 +02:00
Andreas Shimokawa
73187431b2
Use old Sleep Monitor Activity for Pebble/Morpheuz
...
The new one does not look good with Morpheuz data yet (samples every 10 minutes)
2015-06-13 20:37:53 +02:00
Andreas Shimokawa
d2f7169de4
Really, I see no reason to look up a string for a preference key in an xml file
...
If we have to use a key to lookup the string for the key, we can just use that key as the preference key.
2015-06-13 01:12:08 +02:00
Andreas Shimokawa
56d314d054
Reformat code and optimize imports
2015-06-13 00:32:48 +02:00
Andreas Shimokawa
ad4f708140
Send 2.x style notifications when on FW 3.x (on FW 2.x else use 1.x style notifications)
...
This could improve #24 . Unfortunally I cannot test it since I have no Pebble Time.
2015-06-13 00:26:55 +02:00
Daniele Gobbetti
ac7e21be48
Remove the activity log debug file.
...
This partially reverts commit 8b268a676c
2015-06-12 22:30:14 +02:00
Daniele Gobbetti
376f9c53a0
Fix crash on startup
...
Fixed a typo that was causing a force close on database creation.
2015-06-12 21:26:11 +02:00
Daniele Gobbetti
75de3b21e1
Use colors that are easier on the eyes
...
Changed the colors of the Deep-/Light Sleep and Activity datasets.
* Deep sleep has been used as basic color,
* Light sleep is a color that is monochromatically analogous
* Activity is a color triadic to the basic one
2015-06-12 11:17:44 +02:00
cpfeiffer
8aef92026c
A new sleep chart based on MPAndroidChart 45
...
- supports zooming an panning
- displays labels for all x-values (= time of day)
- fix deep vs. light sleep constants
- increase activity data buffer size for Mi Band
2015-06-11 23:37:00 +02:00
Andreas Shimokawa
9051e10aad
switch constants for deep sleep and light sleep to match native miband data
2015-06-11 23:00:59 +02:00
Andreas Shimokawa
dfcad94c2c
Pebble: Make firmware installation possible from recovery ( Closes #54 )
...
Also make HW revision displayable for Pebble Time.
2015-06-11 20:40:31 +02:00
cpfeiffer
d0b9914770
Keep the db open while adding samples
2015-06-09 21:05:44 +02:00
cpfeiffer
e78e79a9a9
Added missing returns..
2015-06-08 23:31:12 +02:00
Andreas Shimokawa
efac912929
Pebble: Fix error when reinstalling apps, useful for upgrading/downgrading
...
Fixes #65
2015-06-08 22:38:58 +02:00
Andreas Shimokawa
4f8a7ea64d
Misuse device_candidate_item insead of device_item for AppManager
2015-06-07 22:02:40 +02:00
Andreas Shimokawa
c98716d469
Morpheuz support: Fix 3.1 compatibility
2015-06-07 21:49:05 +02:00
cpfeiffer
ba76f64bf6
Disable context menu while busy and add "Disconnect" to context menu
2015-06-07 15:31:42 +02:00
cpfeiffer
ab97b544f0
Some cleanup + actually remember event time and kind for throttling
2015-06-06 23:59:53 +02:00
cpfeiffer
f5a569610f
Wrap DeviceSupport instances.
...
The wrapper provides support for busy-checking and throttling
(sometimes I get multiple events of the same kind within milli seconds
and the Mi Band vibrates 20 times)
2015-06-06 23:54:34 +02:00
cpfeiffer
f6d5767276
Remove reference to PebbleIOThread from BluetoothCommunicationService
...
Let PebbleSupport do this instead.
2015-06-06 23:24:00 +02:00
cpfeiffer
3fe9195d0d
Avoid warning in unsetDynamicState()
2015-06-06 23:13:26 +02:00
cpfeiffer
020d8d74d6
Added "Fetch Activity Data" to the context menu.
...
With some kind of progress reporting during the fetching #45
2015-06-06 19:39:04 +02:00
cpfeiffer
9e4e50be47
Initial work on synchronizing activity data with feedback.
...
A device now has a busy flag (set during synchronization). While busy,
no other communication with the device shall occur (TODO)
Refactors the non-bluetooth actions a bit #45
Next step: make use of the busy state in ControlCenter (show
a busy cursor) and in BluetoothCommunicationService (to not call other
operations while busy)
2015-06-06 00:40:16 +02:00
cpfeiffer
2f0d00d645
avoid WITHOUT ROWID when not running at least lollipop #62
2015-06-06 00:10:38 +02:00
cpfeiffer
1e89b12b15
Avoid creating lots of SimpleDateFormat instances
2015-06-05 23:09:28 +02:00
cpfeiffer
dea4ee82a1
Merge branch 'db_refactoring_proposal'
2015-06-05 21:57:55 +02:00
cpfeiffer
c4096e6d3c
Add daniele's db optimization the WITHOUT ROWID
...
closes #62
2015-06-05 21:46:56 +02:00
Andreas Shimokawa
b12a3e74cd
MorpheuzSupport: remove limit of 54 samples. Morpheuz 3.1 supports 60
2015-06-05 20:26:11 +02:00
Andreas Shimokawa
baecc20742
SleepMonitorActivity: Rotate annotation text for better readability
2015-06-05 19:59:58 +02:00
Andreas Shimokawa
813a02d5c7
Unify SleepMonitor with code from PR #59 . Thanks Daniele!
2015-06-05 19:32:09 +02:00
cpfeiffer
2f1908e480
Make sure to always close the database
2015-06-04 23:45:46 +02:00
Daniele Gobbetti
fc374881c5
Get rid of the unused ID in the DB, this could help in:
...
* reducing the used space
* reducing the time needed for inserts
2015-06-04 21:37:48 +02:00
Carsten Pfeiffer
7ad38c5e1a
Merge pull request #61 from danielegobbetti/fix_data_in_the_future
...
Do not iterate over the whole buffer, but only on the effectively useā¦
2015-06-04 21:15:52 +02:00
Daniele Gobbetti
a1ff9aab21
Do not iterate over the whole buffer, but only on the effectively used part.
...
This should fix the "data in the future" issue
2015-06-04 18:56:35 +02:00
Andreas Shimokawa
7d86396e30
Support CM 12.1 Music App
2015-06-02 21:48:21 +02:00
Daniele Gobbetti
406f9ab90d
Do not allocate the buffer if there's no data available.
...
Perhaps could fix the "data in the future" issue
2015-06-02 18:33:12 +02:00
Daniele Gobbetti
9e2d32c33f
Fixed timestamp conversion for DB, added local variables to make the code clearer
2015-06-01 22:20:28 +02:00
Daniele Gobbetti
ea97a902d1
*unchecked* Storing activity values in the DB.
2015-06-01 22:20:28 +02:00