Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
Update BluetoothUtils.java
Browse files Browse the repository at this point in the history
Removed assignment to "flags2" and "strideDistance"
  • Loading branch information
udisha0606 authored Oct 14, 2023
1 parent ed2477c commit 271a57c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public static SensorDataCyclingPower.Data parseCyclingPower(String address, Stri

int index = 0;
int flags1 = characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT8, index++);
int flags2 = characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT8, index++);
characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT8, index++);
boolean hasPedalPowerBalance = (flags1 & 0x01) > 0;
boolean hasAccumulatedTorque = (flags1 & 0x04) > 0;
boolean hasWheel = (flags1 & 16) > 0;
Expand Down Expand Up @@ -261,7 +261,7 @@ public static SensorDataRunning parseRunningSpeedAndCadence(String address, Stri

index = 4;
if (hasStrideLength && valueLength - index >= 2) {
Distance strideDistance = Distance.ofCM(characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT16, index));
Distance.ofCM(characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT16, index));
index += 2;
}

Expand Down

0 comments on commit 271a57c

Please sign in to comment.