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.
- 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
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.
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
- 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
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)
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)
* no more ByteBuffer, but a fixed size byte array that gets flushed everytime it's needed
* log of activity data to a separate file (no DB integration yet)
* the size of the buffer must be a multiple of 3 (1 minute of data = 3 bytes) and 20 (the normal size of the chunks we get from the device)
* better logging and more comments in code
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.