mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Zepp OS: Fix and log experimental temperature fetch
This commit is contained in:
@@ -35,5 +35,6 @@ public class RecordedDataTypes {
|
||||
// Types to fetch during sync - scheduled, sync button, etc.
|
||||
// Does not include debug logs or workouts
|
||||
public static final int TYPE_SYNC = TYPE_ACTIVITY | TYPE_GPS_TRACKS | TYPE_SPO2 | TYPE_STRESS |
|
||||
TYPE_TEMPERATURE |
|
||||
TYPE_HEART_RATE | TYPE_PAI | TYPE_SLEEP_RESPIRATORY_RATE;
|
||||
}
|
||||
|
||||
+5
-4
@@ -52,12 +52,13 @@ public class FetchTemperatureOperation extends AbstractRepeatingFetchOperation {
|
||||
final ByteBuffer buffer = ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN);
|
||||
|
||||
while (buffer.position() < bytes.length) {
|
||||
final int temperature = buffer.getShort();
|
||||
final byte[] unknown = new byte[6];
|
||||
buffer.get(unknown);
|
||||
final int temp1 = buffer.getShort();
|
||||
final int temp2 = buffer.getShort();
|
||||
final int temp3 = buffer.getShort();
|
||||
final int temp4 = buffer.getShort();
|
||||
|
||||
// TODO persist / parse rest
|
||||
LOG.warn("Temperature: {}, unknown={}", temperature, GB.hexdump(unknown));
|
||||
LOG.warn("temp1: {}, temp2={}, temp3: {}, temp4={}", temp1, temp2, temp3, temp4);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user