- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi - I've successfully modified the capsense proximity project to add more data characteristics and changed their names and change the numbers various ways w/ no problem.
Now I'm trying to change the data to float32, and did so also in the BLE GATT server to be float32 for the characteristic - but am getting an incompatible pointer type:
void SendData(float32 Ah, float32 V, float32 A, float32 S, float32 D)
{
CYBLE_GATTS_HANDLE_VALUE_NTF_T notificationHandle;
if(busyStatus == CYBLE_STACK_STATE_FREE)
{
notificationHandle.attrHandle = CYBLE_EBIKEDATA_AMPHOUR_CHAR_HANDLE;
notificationHandle.value.val = &Ah; <-- incompatible pointer types assigned to uint8 from float32
notificationHandle.value.len = NOTIFICATION_DATA_LEN;
CyBle_GattsNotification(connectionHandle,¬ificationHandle);
#define NOTIFICATION_DATA_LEN 4
Looking for how to update different data types, or where the uint8 is baked in, or an example to copy. Thanks!
Minimal bundle attached.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cast your &Ah to a (void *)(&Ah)
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! That's working - for my first value, getting 0.026Ah correctly ( 64:5D:DC:3C )
My voltage and rest are missing but that's another issue :}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh cool - now it's totally working - my last bug was the lines of data coming from the Cycle Analyst are TAB delimited, not space. Now all values show up in CySmart.