Skip to content

Commit 59725d8

Browse files
committed
DEV-341 #time 1h fix for unknown charger chip status via dock
1 parent 6ff6848 commit 59725d8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ShimmerDriver/src/main/java/com/shimmerresearch/driverUtilities/ShimmerBattStatusDetails.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ public ShimmerBattStatusDetails(byte[] rxBuf) {
7575
if(rxBuf.length >= 3) {
7676
// Parse response string
7777
int battAdcValue = (((rxBuf[1]&0xFF) << 8) + (rxBuf[0]&0xFF));
78-
int chargingStatus = rxBuf[2] & 0xC0;
78+
// Parse as unsigned byte and let full byte through to handle UNKNOWN status
79+
int chargingStatus = rxBuf[2] & 0xFF;
7980
update(battAdcValue, chargingStatus);
8081
}
8182
}

0 commit comments

Comments
 (0)