Skip to content

Commit

Permalink
[bluegiga] Fixed get characteristic data issue (#6862)
Browse files Browse the repository at this point in the history
Signed-off-by: Pauli Anttila <[email protected]>
  • Loading branch information
paulianttila authored and kaikreuzer committed Jan 19, 2020
1 parent a806590 commit 0da33c1
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,8 @@ public void bluegigaEventReceived(BlueGigaResponse event) {
if (characteristic == null) {
logger.debug("BlueGiga didn't find characteristic for event {}", event);
} else {
characteristic.setValue(valueEvent.getValue().clone());

// If this is the characteristic we were reading, then send a read completion
if (procedureProgress == BlueGigaProcedure.CHARACTERISTIC_READ && procedureCharacteristic != null
&& procedureCharacteristic.getHandle() == valueEvent.getAttHandle()) {
Expand All @@ -427,7 +429,7 @@ public void bluegigaEventReceived(BlueGigaResponse event) {
}

// Notify the user of the updated value
notifyListeners(BluetoothEventType.CHARACTERISTIC_UPDATED, procedureCharacteristic);
notifyListeners(BluetoothEventType.CHARACTERISTIC_UPDATED, characteristic);
}
}
}
Expand Down

0 comments on commit 0da33c1

Please sign in to comment.