readme.txt 914 B

123456789101112131415161718192021222324252627282930313233343536
  1. If you are upgrading from version 5.3.1 or older to version 5.4.0 please note the following changes:
  2. All BluetoothHelper class events now have BluetoothHelper as their 1st parameter.
  3. this is for better support of connection to multiple instance,
  4. for example, previously you would do:
  5. bluetoothHelper.OnConnected += ()
  6. {
  7. //do something...
  8. }
  9. now you do :
  10. bluetoothHelper.OnConnected += (helper)
  11. {
  12. //do something...
  13. //inside this function, you now have a reference to the caller of that function!
  14. }
  15. the above is applicable for all events.
  16. another exampler:
  17. bluetoothHelper.OnCharacteristicChanged += OnCharacteristicChanged;
  18. void OnCharacteristicChanged (BluetoothHelper helper, byte[] value, BluetoothHelperCharacteristic characteristic)
  19. {
  20. //do somthing
  21. }
  22. previously it was :
  23. void OnCharacteristicChanged (byte[] value, BluetoothHelperCharacteristic characteristic)
  24. {
  25. //do somthing
  26. }