Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRough idea for backwards compatibility with old BLE API #12
Conversation
The data provided from gyroscope has no sense without timing information. This means that a correct FIFO or rate-limiting must be implemented from the sub-class. Close #1
This comment has been minimized.
This comment has been minimized.
This is a very minor point, but what about calling this setTimeProvider()? |
it's now implicit from general API version
@@ -39,7 +39,8 @@ enum BLEProperty { | |||
BLEIndicate = 0x20 | |||
}; | |||
|
|||
typedef void (*BLECharacteristicEventHandler)(BLECentral& central, BLECharacteristic& characteristic); | |||
typedef void (*BLECharacteristicEventHandler)(BLECentral central, BLECharacteristic characteristic); |
sgbihu
Sep 29, 2016
Their has a conflict between BLECentral and BLEDevice. At least, their should define another function type with BLEDevice parameter. Or the new API can't schedule the event.
Their has a conflict between BLECentral and BLEDevice. At least, their should define another function type with BLEDevice parameter. Or the new API can't schedule the event.
sandeepmistry
Sep 29, 2016
Author
Contributor
I'll push a change for this:
typedef void (*BLECharacteristicEventHandler)(BLEDevice central, BLECharacteristic characteristic);
typedef void (*BLECharacteristicEventHandlerOld)(BLECentral ¢ral, BLECharacteristic &characteristic); // deprecated
I'll push a change for this:
typedef void (*BLECharacteristicEventHandler)(BLEDevice central, BLECharacteristic characteristic);
typedef void (*BLECharacteristicEventHandlerOld)(BLECentral ¢ral, BLECharacteristic &characteristic); // deprecated
@@ -30,7 +30,7 @@ enum BLEDeviceEvent { | |||
BLEDisconnected = 2, | |||
}; | |||
|
|||
typedef void (*BLEDeviceEventHandler)(BLEDevice& device); | |||
typedef void (*BLEDeviceEventHandler)(BLEDevice device); |
sgbihu
Sep 29, 2016
Can you tell me the reason about not use reference? The copy my have some overload.
Can you tell me the reason about not use reference? The copy my have some overload.
sandeepmistry
Sep 29, 2016
Author
Contributor
This was a request from @tigoe (#7 (comment)).
From what I recall, the bigger discussion was related to beginners being confused by the syntax. @tigoe let me know if I missed something or didn't explain it correctly.
This was a request from @tigoe (#7 (comment)).
From what I recall, the bigger discussion was related to beginners being confused by the syntax. @tigoe let me know if I missed something or didn't explain it correctly.
@@ -39,7 +39,8 @@ enum BLEProperty { | |||
BLEIndicate = 0x20 | |||
}; | |||
|
|||
typedef void (*BLECharacteristicEventHandler)(BLECentral& central, BLECharacteristic& characteristic); | |||
typedef void (*BLECharacteristicEventHandler)(BLECentral central, BLECharacteristic characteristic); |
sandeepmistry
Sep 29, 2016
Author
Contributor
I'll push a change for this:
typedef void (*BLECharacteristicEventHandler)(BLEDevice central, BLECharacteristic characteristic);
typedef void (*BLECharacteristicEventHandlerOld)(BLECentral ¢ral, BLECharacteristic &characteristic); // deprecated
I'll push a change for this:
typedef void (*BLECharacteristicEventHandler)(BLEDevice central, BLECharacteristic characteristic);
typedef void (*BLECharacteristicEventHandlerOld)(BLECentral ¢ral, BLECharacteristic &characteristic); // deprecated
@@ -30,7 +30,7 @@ enum BLEDeviceEvent { | |||
BLEDisconnected = 2, | |||
}; | |||
|
|||
typedef void (*BLEDeviceEventHandler)(BLEDevice& device); | |||
typedef void (*BLEDeviceEventHandler)(BLEDevice device); |
sandeepmistry
Sep 29, 2016
Author
Contributor
This was a request from @tigoe (#7 (comment)).
From what I recall, the bigger discussion was related to beginners being confused by the syntax. @tigoe let me know if I missed something or didn't explain it correctly.
This was a request from @tigoe (#7 (comment)).
From what I recall, the bigger discussion was related to beginners being confused by the syntax. @tigoe let me know if I missed something or didn't explain it correctly.
enum BLEPeripheralEvent { | ||
BLEConnected = 0, | ||
BLEDisconnected = 1 | ||
}; |
sandeepmistry
Sep 29, 2016
Author
Contributor
These enums need to be removed as well, so they don't conflict with BLEDevice's.
These enums need to be removed as well, so they don't conflict with BLEDevice's.
Probably also widely outdated @facchinm what do you think, can we close it? |
I'm not planning to merge this, it's more to get the discussion going.
cc/ @SidLeung @sgbihu