mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-06-05 21:49:48 +02:00
Pass shorts along to avoid implicit signed conversion.
This commit is contained in:
@@ -57,7 +57,7 @@ public class GadgetbridgePblSupport {
|
|||||||
byte type = (byte) ((sample & 0xe000) >>> 13);
|
byte type = (byte) ((sample & 0xe000) >>> 13);
|
||||||
byte intensity = (byte) ((sample & 0x1f80) >>> 7);
|
byte intensity = (byte) ((sample & 0x1f80) >>> 7);
|
||||||
byte steps = (byte) (sample & 0x007f);
|
byte steps = (byte) (sample & 0x007f);
|
||||||
db.addGBActivitySample(timestamp + offset_seconds, SampleProvider.PROVIDER_PEBBLE_GADGETBRIDGE, intensity, steps, type);
|
db.addGBActivitySample(timestamp + offset_seconds, SampleProvider.PROVIDER_PEBBLE_GADGETBRIDGE, (short) (intensity & 0xff), (short) (steps & 0xff), type);
|
||||||
offset_seconds += 60;
|
offset_seconds += 60;
|
||||||
}
|
}
|
||||||
} catch (GBException e) {
|
} catch (GBException e) {
|
||||||
|
Reference in New Issue
Block a user