Skip to content

Commit

Permalink
fix: removed whitespace in string, since toInt throws otherwise
Browse files Browse the repository at this point in the history
  • Loading branch information
mhochsto committed Oct 22, 2024
1 parent bbb4042 commit 82e3d6d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ class AbrevvaBleModule(reactContext: ReactApplicationContext) :
val keyHex = byteArrayOf(scanRecordBytes.getByte(6)!!) + byteArrayOf(
scanRecordBytes.getByte(5)!!
)
val keyDec = bytesToString(keyHex).toInt(16)
val keyDec = bytesToString(keyHex).replace(" ", "").toInt(16)

// Slice out manufacturer data
val bytes = scanRecordBytes.copyOfRange(7, scanRecordBytes.size)
Expand Down

0 comments on commit 82e3d6d

Please sign in to comment.