Skip to content

Commit

Permalink
Log the blaster firmware version
Browse files Browse the repository at this point in the history
  • Loading branch information
Dees-Troy committed Sep 6, 2018
1 parent 3e02de5 commit 24a2eef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ private void broadcastUpdate(final BluetoothGattCharacteristic characteristic) {
final Intent intent = new Intent(TELEMETRY_DATA_AVAILABLE);
sendBroadcast(intent);
} else if (UUID_RECOIL_ID.equals((characteristic.getUuid()))) {
int firmwareVer = (characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT8, 0) << 8) + characteristic.getIntValue(BluetoothGattCharacteristic.FORMAT_UINT8, 1);
Log.d(TAG, "Firmware version: " + firmwareVer);
// This gets the blaster type, 1 for rifle and 2 for pistol
final Intent intent = new Intent(ID_DATA_AVAILABLE);
final byte[] data = characteristic.getValue();
Expand Down

0 comments on commit 24a2eef

Please sign in to comment.